Question: C++ Please! Exercise 2: Portfolio (This is essentially Exercise P9.11 of the book) Write a program portfolio.cpp that implements a class Portfolio. This class has

C++ Please!

C++ Please! Exercise 2: Portfolio (This is essentially Exercise P9.11 of the

Exercise 2: Portfolio (This is essentially Exercise P9.11 of the book) Write a program portfolio.cpp that implements a class Portfolio. This class has two data mem- bers, checking and savings, of the type BankAccount that was developed in Worked Example 9.1 of the book. Implement four member functions: deposit(double amount, string account) withdraw(double amount, string account) transfer (double amount, string account) print balances () Here the account string is "S" or "C". Assume the user inputs "D" for deposit, "W" for with drawal, and "T" for transfer. For a transfer, the account we input is what we are transferring from; the money is automatically transferred to the other account. Please assume that the user has a checking balance of 2,500 and a savings balance of 10,000. Please have the output formatted exactly like the following examples: (the red is user input) Account: S Action: W Amount: 500.50 Checking Now: 1999.50 Savings Now: 10000 Account: S Action: D Amount: 500.50 Checking Now: 3000.50 Savings Now: 10000 Account: C Action: T Amount: 1000 Checking Now: 1500 Savings Now: 11000 Note: Assume the user has an initial checking balance of 2,500 and an initial savings balance of 10,000. Note on formatting: We'll stress again - please have the formatting like the above examples. Make sure to have colons. No invalid inputs: You do NOT have to worry about the user giving invalid inputs incorrect characters, really large numbers, etc. You may not use st dafx.h

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