Question: Write a program in Java. Present Value Suppose you want to deposit a certain amount of money into a savings account, and then leave it
Write a program in Java.
Present Value
Suppose you want to deposit a certain amount of money into a savings account,
and then leave it alone to draw interest for the next years. At the end of years,
you would like to have $ 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:
The terms in the formula are as follows:
is the present value, or the amount that you need to deposit today.
is the future value that you want in the account. In this case, is
$
is the annual interest rate.
is the number of years that you plan to let the money sit in the account.
Write a method named presentValue that performs this calculation. The method
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 method in a program that lets the user experiment
with different values for the formula's terms.
Provide screenshots of the programs output.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
