Question: Project: Calculating Future Investment Value Problem Description: Write a program that reads in investment amount, annual interest rate, and number of years, and displays the

Project: Calculating Future Investment Value

Problem Description:

Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula (Note that we are compounding on a monthly basis instead of a yearly basis):

futureInvestmentValue = investmentAmount * (1 + monthlyInterestRate)numberOfMonths

monthlyInterestRate = annualInterestRate/12

For example, if you enter amount 1000, annual interest rate 3.25% (3.25/100), and number of years 1, the future investment value is approximately 1032.99.

Here is a sample run:

Sample:

Enter investment amount: 1000

Enter annual interest rate (in percentage points): 3.25

Enter number of years: 1

Accumulated value is: 1032.9885118105894

What to deliver?

Your .java file including:

1. A sample run at the top with investment amount of 3000, annual interest rate of 5.5%, and 3 years. These should be commented. (2 points)

2. Your code with other appropriate comments. (Code: 5 points, Comments: 3 points)

Hint:

1. CalculateProducts.java in the Classroom Example folder at eLearning provides a good example of a deliverable. It has both the sample run commented and we can run the java file without changing the file.

2. Hint: Use the Math.pow(x, y) method to compute x raised to the power of y.

3. Use the sample run in the instruction to test your program to make sure it is correct before you submit it.

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!