Question: Open the project named ch 0 4 _ ex 4 _ FutureValue that's in the ex _ starts folder. Remove all the code inside the
Open the project named chexFutureValue that's in the exstarts folder.
Remove all the code inside the while loop, except for the code that gets the monthly investment amount and the number of years from the user and the code that asks if the user wants to continue.
Within the while loop, add statements that create NumberFormat objects that can be used to format the interest rates and future values as shown above.
Within the while loop, add a for loop that displays the interest rates from to at increments. To align the columns for the rates, you can use the printf method.
Within the while loop, add nested for loops that calculate and display the future value for the investment amount at each interest rate and for the number of years entered by the user. Again, you can use the printf method to align the columns.
Run the application and test it to make sure it works correctly, even for slightly larger values for the monthly investment and the number of years.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
