Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Suppose you want to deposit a certain amount of money into a saving account, and then leave it alone to draw interest for the next 10 years. At the end of 10 years you would like to have $10,000 in the account. How much do you need to deposit today to make that happen? You can use the following formula, which is known as the present value formula, to find out:

P= F/(1/+r)^n

The terms in the formula are:

P is the present value, or the amont that you need to deposit today. F is the future value that you want in the account. (In this case, F is $10,000.)r is the annual interest rate (expressed in decimal form)
n is the number of years that you plan to let the money sit in the account.

prepare a program that has a function named presentValue that performs this calculation. The function should accept the future value, annual interest rate, and number of years as arguments. It should return the present value, which is the amount that you need to 
deposit today. Demonstrate the function in a program that lets the user experiment with different values for the formula's terms. 

Additional Requirements 

Other Requirements: Here's what I have so far:


import java.util.Scanner;


public class FutureValue

{
public static void main(String[] args);
{
int principle;
int rate;
int years;
}


}

splash();

Scanner input = new Scanner(System.in);

System.out.println("What was the amount of the principle deposit? ");

double principle = input.nextDouble();

System.out.println("What is the annual interest rate? ");

double rate = input.nextDouble();

System.out.println("What is the term of the investment in years? ");

double years = input.nextDouble();

double futureValue = calcFV(profit, rate, years);

System.out.println("Your investment will be worth approximately: " + futureValue);

{

public static void splash()
}

System.out.println("This program will find out approximately the future value of an investment based on these three variables:");

System.out.println("The amount of the principle deposit");

System.out.println("The amount of the annual interest rate");

System.out.println("The term of the investment in years");

}

public static double calcFV(double p, double r, double t) // p = double principle r = double rate t = double years

{

double futureValue = p * Math.pow( (1.0 + r/100), t);

return futureValue;
}
}

 

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M984349

Have any Question?


Related Questions in Computer Engineering

Give a recursive algorithm that generates a similar series

Give a recursive algorithm that generates a similar series of coins for changing n cents. Don't use dynamic programming for this problem.

1 select one of the topics listed below and discuss

1. Select one of the topics listed below and discuss it. Describe an application that you have to solve by using at least 2 Excel functions. It can be Math, Statistics, Engineering, Financial, etc. Explain what Excel fun ...

The freemont automobile factory has discovered that the

The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produce. I need help finding an application that computes and displays a worker's anticipated out ...

My kids love playing uno and we just finished up an intense

My kids love playing UNO and we just finished up an intense round. Lets say that the deck has 80 cards. 20 red, 20 blue, 20 green and 20 yellow.  What is the probability of pulling 3 green cards if the first 2 are replac ...

Question write a 2 page briefing paper in which you present

Question: Write a 2 page briefing paper in which you present a summary of the issues (including a description of the types of intellectual property which may have been stolen). You should then summarize your research int ...

Question create for your company amp conduct cyber

Question: Create for your company & conduct cyber assessment using the CSET Cybersecurity Framework (CSF) requirement-based assessment a. complete site info b. Sector & demo: i. [Select your business] ii. [Select your bu ...

What is the sum after execution assume that min and max are

What is the SUM after execution? Assume that MIN and MAX are integers provided provided by the user, and that MAX is greater than MIN. (Solve without choosing actual values) INPUT MIN, MAX SUM= 0 DOFOR M= MIN, MAX SUM= S ...

Question please review the description of the organization

Question: Please review the description of the organization that is the subject of your semester project. The description of that organization, CITY GENERAL HOSPITAL, is described in the instructions for Phase I that you ...

1 the lab manual instructs you to heat camphor at position

1.) The lab manual instructs you to heat camphor at position 2 on the hot plate, which is a moderately low setting. What would be a problem of heating the camphor too quickly? 2.) A mixture of ammonium chloride, sand, an ...

A population has a mean72 and a standard deviation sigma28

A population has a mean=72 and a standard deviation σ=28. Find the mean and standard deviation of a sampling distribution of sample means with sample size n=49.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As