Create class saving account


Create class SavingAccount. Use a Shared class variable to store the annualInterestRate for all SavingsAccounts. Each object of the class contains a Private instance variable savingsBalance indicating the amount the saver currently has on deposit. Provide the CalculateMonthlyInterest method to calculate the monthly interest by multiplying the savingBalance by the annualInterestRate divided by 12; this interest should be added to savingsBalance and returned to the method caller. Provide a shared method ModifyInterestRate that sets the annualInterestRate to a new value. Write an applicationto test class SavingsAccount. Instantiate two SavingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 4% then calculate the monthly interest and display the amount of interest earned and the new balances for each of the savers. Then set the annualInterestRate to 5% and calculate the next month's interest and display the amounts of interest earned and the new balances for each of the savers.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create class saving account
Reference No:- TGS0537785

Expected delivery within 24 Hours