(Solved) : Exercise 1 Future Value Periodic Investments 10pt Suppose Keep Investing 1000 Mutual Fund Q44080042 . . .

Exercise 1: Future Value of Periodic Investments (10pt) Suppose you keep investing $1000 into a mutual fund at the beginning of each month, and the fund’s annual rate of return is 12%, which is 1% per month. By the end of the fifth year, how much money will you have in the mutual fund? This is a typical example of the future value of periodic investments. Write a simple Java program to calculate the future value of periodic investments. Save it as Hw2_Ex1.java. Your program should be able to do the following: (i) Prompt the user to enter the amount of investment each period, read in the value and save it to a variable; Prompt the user to enter the rate of return each period, read in the value and save it to a variable; Prompt the user to enter the total number of periods, read in the value and save it to a variable; Calculate the future value using the following formula, and display the result on the screen (only display two digits after the decimal point). (Hint: use printf) (1+r)n+1 – (1 + r) FV = M: Amount of investment per period r: rate of return per period n: Total number of periods Example: The answer to the above example is $82,486.37. If your program is correct, your output should look like the following: 05. Command Prompt C:test>javac Hw2_Ex1.java C:test>java Hw2_Ex1 Amount of Periodic Investment: 1000 Rate of Return per Period: 0.01 Number of Periods: 60 Future Value : 82486.37 C: test. Hints: The following (partial) statements may be useful import java.util.Scanner; Scanner input = new Scanner (System.in); … input.nextDouble() … Also, you will need to use the Math.pow (x, y) and Math.sqrt(x) method. Show transcribed image text Exercise 1: Future Value of Periodic Investments (10pt) Suppose you keep investing $1000 into a mutual fund at the beginning of each month, and the fund’s annual rate of return is 12%, which is 1% per month. By the end of the fifth year, how much money will you have in the mutual fund? This is a typical example of the future value of periodic investments. Write a simple Java program to calculate the future value of periodic investments. Save it as Hw2_Ex1.java. Your program should be able to do the following: (i) Prompt the user to enter the amount of investment each period, read in the value and save it to a variable; Prompt the user to enter the rate of return each period, read in the value and save it to a variable; Prompt the user to enter the total number of periods, read in the value and save it to a variable; Calculate the future value using the following formula, and display the result on the screen (only display two digits after the decimal point). (Hint: use printf) (1+r)n+1 – (1 + r) FV = M: Amount of investment per period r: rate of return per period n: Total number of periods Example: The answer to the above example is $82,486.37. If your program is correct, your output should look like the following: 05. Command Prompt C:test>javac Hw2_Ex1.java C:test>java Hw2_Ex1 Amount of Periodic Investment: 1000 Rate of Return per Period: 0.01 Number of Periods: 60 Future Value : 82486.37 C: test. Hints: The following (partial) statements may be useful import java.util.Scanner; Scanner input = new Scanner (System.in); … input.nextDouble() … Also, you will need to use the Math.pow (x, y) and Math.sqrt(x) method.
Expert Answer
Answer to Exercise 1: Future Value of Periodic Investments (10pt) Suppose you keep investing $1000 into a mutual fund at the begin…
OR