subject

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 balances for each of
the savers. Then set the annualInterestRate to 4 percent, calculate the next month's
interest and print the new balances for each of the savers.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:10, normarismendoza
Dean wants a quick way to look up staff members by their staff id. in cell q3, nest the existing vlookup function in an iferror function. if the vlookup function returns an error result, the text “invalid staff id” should be displayed by the formula. (hint: you can test that this formula is working by changing the value in cell q2 to 0, but remember to set the value of cell q2 back to 1036 when the testing is complete.)
Answers: 3
image
Computers and Technology, 22.06.2019 23:30, Molly666
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
image
Computers and Technology, 23.06.2019 01:00, leo4687
Complete the sentence about a presentation delivery method
Answers: 2
image
Computers and Technology, 23.06.2019 12:40, Emilyvite6251
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
You know the right answer?
Create a SavingsAccount class. Use a static data member annualInterestRate to store the annual inte...

Questions in other subjects:

Konu
Mathematics, 28.04.2021 01:00