Question: Main.cpp 2 0 points Main will create an instance of each derived class; CheckingAccount * , SavingsAccount * , and CreditAccount * . These instances

Main.cpp 20 points
Main will create an instance of each derived class; CheckingAccount*, SavingsAccount*, and CreditAccount*. These instances should be initialized with new making the heap variables you will need to clean up. Smart pointers are not allowed for these variables. Initialize their balance amounts to whatever you want. Then add a menu system that will allow for deposits and withdrawals to be made to the various accounts.
Create a function for withdraw and one for deposit that will take in a BaseAccount*. Then pass the selected account pointer to this function. Via virtual functionality, the correct withdraw or deposit will be called.
Show on-screen feedback for all transactions such as $150 deposited to CheckingAccount! along with the balances of each of the accounts. Make sure to let your menu run in a loop.

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 Programming Questions!