Write a C++ program(Derived classes of the above Account classes) The above Account class was created to model a bank account. An account has the properties (keep the properties private) account number, balance, and annual interest rate, date created, and functions to deposit and withdraw. Create two derived classes for checking and saving accounts. A checking account has an overdraft limit, but a savings account cannot be overdrawn. Define a constant virtual toString() function in the Account class and override it in the derived classes to return the account number and balance as a string. Implement the classes. Write a test program that creates objects of Account, SavingsAccount, and CheckingAccount and invokes their toString() functions.
Write a C++
created to model a bank account. An account has the properties (keep the properties private)
account number, balance, and annual interest rate, date created, and functions to deposit and
withdraw. Create two derived classes for checking and saving accounts. A checking account has
an overdraft limit, but a savings account cannot be overdrawn. Define a constant virtual toString()
function in the Account class and override it in the derived classes to return the account number
and balance as a string.
Implement the classes. Write a test program that creates objects of Account, SavingsAccount, and
CheckingAccount and invokes their toString() functions.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images