Create an Account class in C++ that implements this UML class diagram.
Create an Account class in C++ that implements this UML class diagram.
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 |
Create a main program which;
1. Requests the initial balances for two separate accounts
2. Creates two Account objects
3. Requests an amount to deposit in the first account
4. Requests an amount to withdraw from the first account
5. Displays the current balance of that account
6. Repeats steps 3-5 with the second account
7. This requires that both Account objects be active at the same time
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images