Question: Answer the question below: Demonstrate your understanding of classes and inheritance by completing the following C# code snippet. 1 ) Define a class called Account
Answer the question below:
Demonstrate your understanding of classes and inheritance by completing the following C# code snippet.
Define a class called Account with the following fields
AccountOwner : string
Balance : decimal
InterestRate : double
OverdraftLimit decimal
a Within your Account class, define your default constructor to automatically set the account balance to M whenever the Account class is being instantiated
b Define another constructor that allows your user to set the Account owner's name, account balance, interest rate and overdraft limit
c Define & implement the following functions within your Account Class
GetBalance This functions retrieves the account balance from the respective field
Withdrawdecimal amount This function allows a user to withdraw funds from their account
Depositdecimal amount This function should allow the user to make a deposit to their bank account
DisplayAccountInfo This function should return the account owner name and current account balance
Define a class called SavingAccount that inherits from the Account Class
a Within your SavingAccount class, create a field string SavingAccType
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
