Calculating Future Investment Value develop a program in Java that reads in (i) investment amount, (ii) annual interest rate, and (iii) number of years and displays the future investment value using...


Calculating Future Investment Value


develop a program in Java that reads in (i) investment amount, (ii) annual interest rate, and


(iii) 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 2.25% (2.25/100), and number


of years 2, the future investment value is approximately 1045.9837866210664.


Here is a sample run:


Sample Run:


Enter investment amount: 1000


Enter annual interest rate (in percentage points): 2.25


Enter number of years: 2


Accumulated value is: 1045.9837866210664



Hints:


1. Import the Scanner class from the java.util package to read the three input variables via


keyboard.


2. Declare variables as "double" or "int" appropriately.


3. Use the Math.pow(x, y) method to compute x raised to the power of y ( xxyy).


4. Use the sample run in the instruction to test your program to make sure it is correct


before you submit it.


What to deliver?


Your .java file (class file) including:


1. A sample run at the top with investment amount of 8000, annual interest rate of 3.50%,


and 10 years. These should be commented. (2 points)


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




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here