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

I need help with the flow chart and comments for the code. (request repunzal: th

ID: 3622511 • Letter: I

Question

I need help with the flow chart and comments for the code. (request repunzal: this is for final project) Thanks

Note: Code included after assignment details)

Exercise 18.7 page 669 C how to program 6th ed. By Deitel
(SavingsAccount Class) Create a SavingsAccount class. Use a static data member annualInterestRate to store the annual interest rate for each of the savers. Each member of the class contains a private data member savingsBalance indicating the amount the saver currently has on deposit. Provide member function calculateMonthlyInterest that calculates the monthly interest by multiplying the balance by annualInterestRate divided by 12; this interest should be added to savingsBalance. Provide a static member function modifyInterestRate that sets the static annualInterestRate to a new value. Write a driver program to test class SavingsAccount. Instantiate two different objects of class SavingsAccount, saver1 and saver2, with balances of 2000.00 and 3000.00, respectively. Set the annualInterestRate to 3 percent. Then calculate the monthly interest and print the new balance for each of the savers. Then set the annualInterestRate to 4 percent, calculate the next month’s interest and print the balances for each of the savers.


#include
#include
using namespace std;
class SavingsAccount
{public:
SavingsAccount( double bal )
{savingsBalance=bal;
}
void calculateMonthlyInterest();
static void modifyInterestRate(double);
void printBalance()const;
private:
double savingsBalance;
static double annualInterestRate;
};
double SavingsAccount::annualInterestRate =0;
void SavingsAccount::calculateMonthlyInterest()
{savingsBalance += savingsBalance*annualInterestRate/12.;
}
void SavingsAccount::modifyInterestRate(double interest )
{annualInterestRate=interest/100.;
}
void SavingsAccount::printBalance() const
{cout<}
int main()
{SavingsAccount a(2000.00);
SavingsAccount b(3000.00);
SavingsAccount::modifyInterestRate(3);
cout<<"Starting balance account a: ";
a.printBalance();
cout<<"Starting balance account b: ";
b.printBalance();
a.calculateMonthlyInterest();
b.calculateMonthlyInterest();
cout<<" monthly interest at 3%: account a ";
a.printBalance();
cout<<" account b ";
b.printBalance();
SavingsAccount::modifyInterestRate(4);
a.calculateMonthlyInterest();
b.calculateMonthlyInterest();
cout<<" monthly interest at 4%: account a ";
a.printBalance();
cout<<" account b ";
b.printBalance();
cout<system("pause");
return 0;
}

Explanation / Answer

Dear, Pseudocode: This program is a combination of 3 different files 1. SavingsAccount.h 2. SavingsAccount.cpp 3. Driver.cpp All the 3 parts were given here one after the other. Please carefully follow. // Declaration of class SavingsAccount (SavingsAccount.h) // Member functions are defined in SavingsAccount.cpp // prevent multiple inclusions of header file # ifndef SAVINGSACCOUNT_H # define SAVINGSACCOUNT_H // Class Date definition class SavingsAccount { public : SavingsAccount(); // default constructor // set the balance amount void setSavingsBalance( double ); // returns the balance double getSavingsBalance(); // calculates the monthly interest void calculateMonthlyInterest(); // modifies the rate of interest // static member function static void modifyInterestRate( float ); // ~SavingsAccount(); // destructor private : static float annualInterestRate; double savingsBalance; }; // end class SavingsAccount # endif // Member function definitions for the class SavingsAccount // SavingsAccount.cpp // SavingsAccount class definition #include "SavingsAccount.h" // define and initialise static data member at file scope float SavingsAccount::annualInterestRate = 1.0; // default constructor for the class SavingsAccount SavingsAccount::SavingsAccount() { setSavingsBalance(0); } // end constructor // set the savings balance void SavingsAccount::setSavingsBalance( double balance) { savingsBalance = balance; } // end setSavingsBalance // return the savings balance double SavingsAccount::getSavingsBalance() { return savingsBalance; } // end getSavingsBalance // calculate the monthly interest for the account void SavingsAccount::calculateMonthlyInterest() { savingsBalance += (savingsBalance * annualInterestRate)/12; } // end function calculateMonthlyInterest // modify the static data member - interest rate void SavingsAccount::modifyInterestRate( float rate) { annualInterestRate = rate; } // end function modifyInterestRate // Driver to test the class - SavingsAccount #include // Allows program to perform input and output using std::cout; // program uses cout // SavingsAccount class definition #include "SavingsAccount.cpp" int main() // function main begins program execution { // instantiate two different objects of type // SavingsAccount SavingsAccount saver1, saver2; // print the initial balances of the objects cout