Question: * Tasks Modify the Account class. Implement and test your new subclasses. Implement a main program which reads commands from a file and carries them
Tasks
Modify the Account class.
Implement and test your new subclasses.
Implement a main program which reads commands from a file and carries them out.
Test your program thoroughly. The instructor will use a different banktxt file to evaluate
your program.
Submit the working classes and main program via the BlackBoard assignment.
Absolute Requirements
The Account class must be an abstract class with two pure virtual functions, closeMonth
and accountString.
The Savings and Checking classes must be subclasses of Account
The bank must handle at least accounts simultaneously with account numbers
Do not duplicate the balance or ID fields in the subclasses
The balance, withdrawal and deposit manipulation must use the methods in the base
class Account.
Each action must display appropriate messages indicating that the action was
completed.
The closeMonth and accountString functions must be called polymorphically. This
means, they are called for each account without checking to see what kind of account it
is being called on
An implication of the last point is that there will be a single array of Account objects,
some of which are Checking accounts and some of which are Savings accounts.
UML
Account
ID: int
Balance: double
Account
AccountnewID: int, initialBalance: double
setIDnewID: int: void
getID : int
setBalancenewBalance: double : void
getBalance : double
withdrawamount: double : void
depositamount: double : void
virtual closeMonth : void
virtual accountString : string
Checking
CheckingID: int, Balance: double, minBalance: double, Interest: double
minBalance : double
monthlyFee : double
closeMonth : void
accountString : string
Savings
minBalance : double
Interest: double
SavingID: int, double: Balance, double: minBalance, double: Interest
closeMonth : void
accountString : string
bankTXT
Savings
Checking
Savings
Deposit
Deposit
Withdraw
Checking
Withdraw
Balance
Withdraw
Deposit
Withdraw
Bad Command
Close
ReportCiUsers paul.koesteriDesktoplBankexe
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
