Create class SavingsAccount. Use a static variable annuallnterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable...


Create class SavingsAccount. Use a static variable<br>annuallnterestRate to store the annual interest rate<br>for all account holders. Each object of the class<br>contains a private instance variable savingsBalance<br>indicating the amount the saver currently has on<br>deposit. Provide method calculateMonthlyInterest to<br>calculate the monthly interest by multiplying the<br>savingsBalance by annuallnterestRate divided by 12-<br>this interest should be added to savingsBalance.<br>Provide a static method setInterestRate that sets the<br>annuallnterestRate to a new value. There should also<br>be a method setSavingsBalance to set the initial<br>savings balance for a new saver or you can do it<br>through a constructor.<br>Write a program to test class SavingsAccount.<br>Instantiate two SavingsAccount objects, saver1 and<br>saver2, with balances of $2000.00 and $3000.00,<br>respectively. Set annuallnterestRate to 4%, then<br>calculate the monthly interest for each 12 months<br>and print the new balances for both savers. Next, set<br>the annuallnterestRate to 5%, calculate the next<br>month's interest and print the new balances for both<br>savers.<br>If you run this java file right now, it only prints out<br>the amount for 1 month. How can you make my<br>program so that it prints the amount for 13 months?<br>It should print out<br>Month 1: 2006.67<br>Month 2: 2013.36<br>Month 3: 2020.07<br>Month 4: 2026.80<br>etc.<br>after 12 month, change the rate to be 5 percent<br>

Extracted text: Create class SavingsAccount. Use a static variable annuallnterestRate 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 annuallnterestRate divided by 12- this interest should be added to savingsBalance. Provide a static method setInterestRate that sets the annuallnterestRate 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 annuallnterestRate to 4%, then calculate the monthly interest for each 12 months and print the new balances for both savers. Next, set the annuallnterestRate 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

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here