Friday 4 November 2016

user input - calculating monthly mortgage payment java

I have tried to figure this out for weeks and have no idea how or where to start.



Write a program that calculates a monthly mortgage payment; we will assume that the interest rate is compounded monthly.
You will need to do the following:
Prompt the user for a double representing the annual interest rate.
Prompt the user for the number of years the mortgage will be held (typical input here is 10, 15, or 30).

Prompt the user for a number representing the mortgage amount borrowed from the bank.



Output a summary of the mortgage problem, as follows:
The annual interest rate in percent notation
The mortgage amount in dollars
The monthly payment in dollars, with only two significant digits after the decimal point
The total payment over the years, with only two significant digits after the decimal point
The overpayment, i.e., the difference between the total payment over the years and the mortgage amount, with only two significant digits after the decimal point
The overpayment as a percentage (in percent notation) of the mortgage amount

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...