Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started