Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a C++ program to process bank accounts (similar to the Lab Assignment #7)

ID: 3635866 • Letter: C

Question

Create a C++ program to process bank accounts (similar to the Lab Assignment #7) but with additional functions.

You may want to solve this problem step-by-step using the following guidelines:
1. First use the Lab Assignment #7. Make sure that your program is using OOP.
2. Secondly, remove the arrays of Checking and Savings objects. Replace them with array of Account objects.
3. Change choice #1 and #2 so that the new checking and savings accounts are stored in array of Account.
4. Combine choice #3 and #5 so that array of Account is used.
5. Combine choice #4 and #6 so that array of Account is used.
6. Change the printBalance functions so that polymorphism virtual functions are used.
7. Add a new calculateDailyInterest functions so that polymorphism virtual functions are used. The functions also add the daily interest to the account balance. The savings account is getting 3% annual interest rate. The checking account is getting 2% annual interest rate for amount that over $500.
8. Add a choice #7 to transfer money between accounts. Make sure you check for not enough money to transfer.


Here is Lab #7


Write a program to process bank accounts. Create a base class named Account and two derived classes named Savings and Checking. In the base class, use an int AccountNum and a double balance for data members. Also, create an overloaded operator+= function to do deposit and an overloaded operator-= function to do withdraw. The printBalance function is created to print both savings and checking accounts. The account number of new account is automatically generated by the program beginning at account number one.


Hint for the test program:

int main( )
{
vector < Checking * > checking(50) ;
vector < Savings *> savings(50);
int accNumS = 0, accNumC = 0;
double bal = 0, amt = 0;
...

case 1:
cout << "Enter balance for accont #" << accNumC+1 << ": ";
cin >> bal;
checking[accNumC] = new Checking(accNumC+1,bal);
accNumC++;
break;
...


case 3:
cout << "Which checking account: ";
cin >> acct;
cout << "Amount of deposit: ";
cin >> amt ;
(*checking[acct-1]) += amt;
break;

Explanation / Answer

#include #include using namespace std; class Bank { private: string myname; int number; double changes; double initialbal; double endingbal; public: Bank(string name=" ", int num=0, double c=0, double ibal=0, double ebal=0) { myname = name; number = num; changes = c; initialbal = ibal; endingbal = ebal; } void EnterName(); void ShowName(void ); void EnterNumber(); void ShowNumber(void ); void EnterChanges(); void ShowChanges(void ); void EnternComputeInitialBal(double ); void ComputeEndinglBal(double ); }; void Bank::EnterName() { cout