Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java please help *6.7 (Financial application: Compute the future investment valu

ID: 643512 • Letter: J

Question

Java please help *6.7 (Financial application: Compute the future investment value) 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 formula in Programming Exercise 2.21. Use the following method header: public static double futurelnvestmentValue( double InvestnientAmount, double monthlylnterestRate, int years) For example, futurelnvestmentValue(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 (able that displays future value for the years from 1 to 30, as shown below; The amount invested: 1000 Annual interest rate: 9 Years Future Value 1 1093.80 , 2 1196.41 . . . 29 13467.25 30 14730.57

Explanation / Answer

import java.io.*;

class futurevalue
{
public void futureinvestmentvalue(double investmoney,double intrestrate,int year)
{
double futurevalue[] = new double[29];
futurevalue[0]=investmoney;
int i;
//double b=0.0;
// b=investmoney;
for(i=0;i<29;i++)

{
double x=1+intrestrate/100;

  
futurevalue[i+1]= futurevalue[i]* Math.pow(x,x);
  

}
// System.out.println(" Years Future Value");
for(i=0;i<29;i++)
{
System.out.println(" "+i+" "+futurevalue[i+1]);

}
// return futurevalue;
}
public static void main(String args[])
{
// double fut[]= new double [29];
futurevalue c= new futurevalue();
c.futureinvestmentvalue(1000,9,30);


}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote