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, 21.06.2019 23:30
Me2540 week 5 assignment what do i want to know?
Answers: 1
question
Computers and Technology, 22.06.2019 02:50
Which of the following had the greatest influence on opening the internet to the generly public
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
question
Computers and Technology, 24.06.2019 05:50
What all vehicles has tesla inc. created over the years
Answers: 3
You know the right answer?
Q2: Create class SavingsAccount. Use a static variable annualInterestRate to store theannual interes...
Questions
question
English, 20.03.2021 01:00
question
English, 20.03.2021 01:00
question
English, 20.03.2021 01:00
question
Mathematics, 20.03.2021 01:00
question
English, 20.03.2021 01:00
question
Mathematics, 20.03.2021 01:00
question
Mathematics, 20.03.2021 01:00
Questions on the website: 13722359