Starting from:

$30

CSE 110 Module 2 Solved

 

Simple Interest 

1. Problem Description
As part of the newly created Financial Services Java Team, you have been asked to create an application that calculates how much interest will be earned in a simple savings account.

The application will be straight forward. It will ask the user for their initial deposit amount, the annual interest rate, and the number of months for which they intend to leave their savings untouched. The application will then report the final balance after the number of months specified.

The future value (FV) for a simple case like this can be calculated using the following formula:

𝐹𝑉 = 𝑃𝑉 × (1 + 𝑖)𝑛  where n = is the term in number of months, i = monthly interest rate as a decimal (annual interest rate per year divided by 100 divided by 12), and PV = initial savings amount (present value).

Remember, in Java, raising one number to a power is done using Math.pow().

Ask the user for the following information:

•       Initial savings amount

•       Number of months to save

•       Annual interest rate

2. Notes
•       Be very careful that you use the interest rate correctly (re-read the problem description) and that you are calculating the future value based on monthly interest, not annual (yearly) interest.

•       For your output, round the dollar figures to exactly two decimal points.

•       Turn in only your source files.

3. Required Main Class 

Savings

4. Required Input
•       Initial savings amount as a real number (float or double)

•       Number of months to save as an integer

•       Annual interest rate as a real number (float or double)

 

5. Required Output: 

Your output should look something like the following example. It should include your name, data values and calculated future value.

Simple Interest - E. Eckert 

 

What is the initial savings amount? 25000 

What is the number of months to save? 24 

What is the annual interest rate? 1.05 

$25000.00, saved for 24 months at 1.05% will be valued at $25530.31 

 

More products