Trusted by 2+ million users, 1000+ happy students everyday
Project 3: Computing Future Investment ValueProblem Description:Write a method that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the following formula:futureInvestmentValue = investmentAmount x (1 + monthlyInterestRate)numberOfYears*12Use the following method header:public static double futureInvestmentValue(double investmentAmount, double monthlyInterestRate, int years)For example, futureInvestmentValue(10000, 0.05/12, 5) returns 12833.59. Write a test program that prompts the user to enter the investment amount (e.g., 1000) and the interest rate (e.g., 9%) and prints a table that displays future value for the years from 1 to 30, as shown below:The amount invested: 1000Annual interest rate: 9%YearsFuture Value1 1093.802 1196.41...2913467.253014730.57Create appropriate validation method(s) to validate user input for the investment amount and the interest rate. You may use the validation method I posted in hands-on labs folder and modify the method to validate a double instead ofan int.Analysis:(Describe the problem including input and output in your own words.)Design:1
Found this document preview useful?
You are reading a preview Upload your documents to download or Become a Desklib member to get accesss