Project 3: Computing Future Investment Value.

Added on - 16 Sep 2019

  • 2

    Pages

  • 292

    Words

  • 112

    Views

  • 0

    Downloads

Trusted by +2 million users,
assist thousands of students everyday
Showing pages 1 to 1 of 2 pages
Project 3: Computing Future Investment ValueProblem Description:Write a method that computes future investment value at agiven interest rate for a specified number of years. Thefuture investment is determined using the following formula:futureInvestmentValue =investmentAmount x (1 + monthlyInterestRate)numberOfYears*12Use the following method header:public static doublefutureInvestmentValue(doubleinvestmentAmount,doublemonthlyInterestRate,intyears)For example, futureInvestmentValue(10000, 0.05/12, 5)returns 12833.59.Write a test program that prompts the user to enter theinvestment amount (e.g., 1000) and the interest rate (e.g.,9%) and prints a table that displays future value for theyears from 1 to 30, as shown below:The amount invested: 1000Annual interest rate: 9%YearsFuture Value11093.8021196.41...2913467.253014730.57Create appropriate validation method(s) to validate userinput for the investment amount and the interest rate. Youmay use the validation method I posted in hands-on labsfolder 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
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Download This Document