Question: (C++) Inheritance and Polymorphism - Create a class definition for an object called Account. Add a constructor and destructor to it. - Create a class

(C++) Inheritance and Polymorphism

- Create a class definition for an object called Account. Add a constructor and destructor to it.

- Create a class CheckingAccount and make it a child class of Account.

- Create a second class named Savings account and also make this class a derived class of Account.

- Create private data members on the derived classes to represent balance and overdraft limits.

- Implement the following class methods on classes that you think are the appropriate ones.

getBalance

getAnnualInterestRate

withdraw

deposit

- Write a main function that instantiates a checking and savings account, and then deposit $100 into each account and set an overdraft limit on the Checking account of $50.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!