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

Write a COMPLETE program to compute future investment value at a given interest

ID: 3590602 • Letter: W

Question

Write a COMPLETE program to compute future investment value at a given interest rate for a specified number of years. The future investme using the following formula: nt is determined numO/Years 12 futurelnvetsmentValue investmentAmount (1+MonthlyInterestRate) our program should prompt the user to enter investment amount, annual interest te, and number of years, and should display the future investment value. ra Hint : Use Math.powta,b) method to compute a raised to the power of NOTE: Please submit a copy of documented program and output.

Explanation / Answer

import java.lang.*;

import java.util.Scanner;

public class Investment {

public static void main(String[] args) {

Scanner sc=new Scanner(System.in);  

double Future_Investment_Value;

double Investment_Amount;

double Monthly_Interest_Rate;

int Number_Of_Years;

System.out.println("Enter Investment_Amount");

Investment_Amount = sc.nextDouble();

System.out.println("Enter Monthly_Interest_Rate");

Monthly_Interest_Rate = sc.nextDouble();

Monthly_Interest_Rate = Monthly_Interest_Rate / 100; // i am doing this operation because rate alwyas // dividable by 100 , if you don't want skip this line you // will get exact answer

System.out.println("Enter Number_Of_Years ");

Number_Of_Years = sc.nextInt();

Future_Investment_Value = Investment_Amount * ( Math.pow((1+Monthly_Interest_Rate),(Number_Of_Years*12)));

System.out.println("Future_Investment_Value = "+Future_Investment_Value);

}

}

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