Savings account class create a savings account class use a


Question: (Savings Account Class) Create a Savings Account class. Use a static data member annual Interest Rate to store the annual interest rate for each of the savers. Each member of the class contains a private data member savings Balance indicating the amount the saver currently has on deposit. Provide member function calculate Monthly Interest that calculates the monthly interest by multiplying the balance by annual Interest Rate divided by 12; this interest should be added to savings Balance. Provide a static member function modify Interest Rate that sets the static annual Interest Rate to a new value. Write a driver program to test class Savings Account. Instantiate two different objects of class Savings Account, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Set the annual Interest Rate to 3 percent. Then calculate the monthly interest and print the new balances for each of the savers. Then set the annual Interest Rate to 4 percent, calculate the next month's interest and print the new balances for each of the savers.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Savings account class create a savings account class use a
Reference No:- TGS02405697

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)