Complete the program below so that it prompts for an initial amount of money (present value or PV) to deposit into a certificate of deposit (CD), the interest rate (INT) for the CD and the number of years (YRS) the CD will grow (until maturity). Compute and print out the future value of the CD after the given number of years has passed. You should use the following formula for future value (FV):


Use the Math.pow() method shown in section 2.5.3.

While the number of years may be an integer, both the amount of money to be deposited and the interest rate should be double variables. The result (FV) should be printed out to two decimal places.

Complete the following file:

CDWorth.java

import java.util.Scanner; /** A program that prompts for the present value, interest rate, and number of years for a certificate of deposit to mature, and then prints the present value. All variables should be of type double. */ public class CDWorth { public static void main (String[] args) { // Display prompt for present value System.out.print("Please enter the amount to be deposited: "); // Read height of rectangle Scanner in = new Scanner(System.in); double presentVal = in.nextDouble(); // Display prompt for interest rate System.out.print("Please enter the rate of interest: "); // Read rate of interest double intRate = in.nextDouble(); // Display prompt for number of years System.out.print("Please enter the number of years: "); // Read number of years int years = in.nextInt(); // Compute and print future value // Your work here System.out.printf("%.2f\n", futureVal); } }