Question: Write a complete Java program (including comments) to calculate the balance of a savings account at the end of a period of time. At the

 Write a complete Java program (including comments) to calculate the balance

Write a complete Java program (including comments) to calculate the balance of a savings account at the end of a period of time. At the beginning, your program should ask the user for 3 pieces of data: 1. starting balance 2. monthly interest rate 3. number of months that passed since the account was established. Your program should then loop for each month, performing the following: A. Ask the user for the amount deposited into the account during the month. Add this amount to the account balance. B. Ask the user for the amount withdrawn during the month. Subtract this amount from the balance. C. Calculate the monthly interest by multiplying the monthly interest rate by the remaining balance. Add the monthly interest to the balance. After the last iteration, your program should display the following: 1. Total amount of deposits 2. Total amount of withdrawals 3. Total interest earned

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!