subject

Q2: Create class SavingsAccount. Use a static variable annualInterestRate to store theannual interest rate for all account holders. Each object of the class contains a privateinstance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying thesavingsBalance by annualInterestRate divided by 12—this interest should be added tosavings-Balance. Provide a static method modifyInterestRate that sets theannualInterestRate to a new value. Write a program to test class SavingsAccount. Instantiatetwo savingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00,respectively. Set annualInterestRate to 4%, then calculate the monthly interest for each of 12months and print the new balances for both savers. Next, set the annualInterestRate to 5%,calculate the next month’s interest and print the new balances for both savers.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
You know the right answer?
Q2: Create class SavingsAccount. Use a static variable annualInterestRate to store theannual interes...
Questions
Questions on the website: 13722360