Question: Create an Account class in C++ that implements this UML class diagram. Account - id:int - balance: double + Account + Account(newID:int, initialBalance: double) +

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 Upload: Your.cpp and.h files with the Account class and main program. Sample Output (User input in bold) Please enter the initial balance for account number 103 567.25 Please enter the initial balance for account number 207 1064.32 How much will you deposit in account 103? 281.00 How much will you withdraw from account 1037 193.67 The current balance in account number 103 is 654.58 How much will you deposit in account 207? 338.34 How much will you withdraw from account 2077 274.99 The current balance in account 207 is 1127.67
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
