Problem

(SavingsAccount Class) Create a SavingsAccount class. Use a static data member annualInter...

(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 calculateMonthlylnterest that calculates the monthly interest by multiplying the savingsBalance by annual InterestRate divided by 12; this interest should be added to savingsBalance. Provide a static member function modifylnterestRate that sets the static annual InterestRate to a new value. Write a driver program to test class SavingsAccount. Instantiate two different objects of class SavingsAccount, saver l and saver 2, with balances of $2000.00 and $3000.00, respectively. Set the annual InterestRate to 3 percent. Then calculate the monthly interest and print the new balances for each of the savers. Then set the annual InterestRate to 4 percent, calculate the next month's interest and print the new balances for each of the savers.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 17
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT