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 bank2.txt 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 10 accounts simultaneously with account numbers 1-9
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()
+Account(newID: int, initialBalance: double)
+setID(newID: int): void
+getID() : int
+setBalance(newBalance: double) : void
+getBalance() : double
+withdraw(amount: double) : void
+deposit(amount: double) : void
+virtual closeMonth() : void
+virtual accountString() : string
-----------------------------------------
Checking
+Checking(ID: int, Balance: double, minBalance: double, Interest: double)
-minBalance : double
-monthlyFee : double
+closeMonth (): void
+accountString () : string
-----------------------------------
Savings
-minBalance : double
-Interest: double
+Saving(ID: int, double: Balance, double: minBalance, double: Interest)
+closeMonth () : void
+accountString () : string
bank2.TXT
Savings 11000.011000.004.0
Checking 22000.022500.006.95
Savings 33000.0320007.0
Deposit 111.11
Deposit 222.22
Withdraw 45000.00
Checking 44000.042000.0011.99
Withdraw 10.10
Balance 2
Withdraw 20.20
Deposit 333.33
Withdraw 40.40
Bad Command 65
Close
ReportCiUsers paul.koesteriDesktoplBank2.exe
* Tasks Modify the Account class. Implement and

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!