Computers and Technology, 28.02.2021 16:50 heyheyhola
Create class SavingsAccount. Use a static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12- this interest should be added to savingsBalance. Provide a static method setInterestRate that sets the annualInterestRate to a new value. There should also be a method setSavingsBalance to set the initial savings balance for a new saver or you can do it through a constructor.
Write a program to 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 for each 12 months 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.
If you run this java file right now, it only prints out the amount for 1 month. How can you make my program so that it prints the amount for 13 months?
It should print out
Month 1: 2006.67
Month 2: 2013.36
Month 3: 2020.07
Month 4: 2026.80
etc.
after 12 month, change the rate to be 5 percent
Answers: 3
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
Create class SavingsAccount. Use a static variable annualInterestRate to store the annual interest r...
Social Studies, 02.08.2019 09:00
Physics, 02.08.2019 09:00
Biology, 02.08.2019 09:00
History, 02.08.2019 09:00
Biology, 02.08.2019 09:00
History, 02.08.2019 09:00
Biology, 02.08.2019 09:00
Biology, 02.08.2019 09:00
Biology, 02.08.2019 09:00