//The program says to Create a Savings Class. Use a static data member to contain the
//annual interestRat for each of the savers. Each member o the class contains a privcate data member savingsbalance indincating the amount the saver currently has on deposit.
//Provide data member SavingsBalance indicating he amount the saver currently has on deposit.
//Provide a calculateMonthlyInterest member function that calculates the monthly interest
//by multiplying the balance by annual InterestRate divide by 12
//This interest should be added to savings Balance.
//Provide a static member function modifyInterestRate that sets the satatic annual
//interestRate to a new value.
//Write a driver Program to test class with balance of $200000 and 300000 respectively
//set annualInterestRate to 3%
//then calculate the monthly interest and print new balances for each savers
//Then set teh annualInterest Rate to 4% and calculate the next months interest and print the new balances
//for each of the savers
class SavingsAccount {
public:
SavingsAccount();
void calculateMonthlyInterest();
//static void modifyInterestrate(int);
void printbalance();
private:
static double savingsBalance;
double balance;
//int y;
//static data member
static double annualInterestRate;
};
double SavingsAccount::annualInterestRate = .3;
double SavingsAccount::savingsBalance = 20000;
//int SavingsAccount::modifyInterestrate = 4;
SavingsAccount::SavingsAccount()
{
savingsBalance = 0;
}
void SavingsAccount::calculateMonthlyInterest()
{
savingsBalance = savingsBalance * annualInterestRate/12.;
}
//void SavingsAccount::modifyInterestRate()
//{
//}
void SavingsAccount:rintbalance()
{
cout<<"You balance is "<<savingsBalance;
}
int main()
{
SavingsAccount saver1;
//SavingsAccount saver2;
//cout<<" The current deposit for saver 1 is";
saver1.calculateMonthlyInterest;
saver1.printbalance;
return 0;
}
//Please help me...