Program 3, Loan Payment.
Short Description:
Write a program that will compute the monthly payment for a simple installment loan.
Goals
When you finish this homework, you should have:
- Designed and implemented a program to use a complex formula.
Formal Description
Write a program that will prompt the user for
- The amount of a loan. (P)
- The annual interest rate (a)
- The number years. (t)
We will assume that the loan will be paid monthly.
To use the formula $a = \frac{P \times i(1+i)^n}{(1+i)^n -1}$ you will need to compute :
- i = a/12, the monthly interest rate
- n = t*12, the number of payments.
For your reference, here is an online version of this program with accompanying formula and explanation.
Additional Notes
- Please put a comment with identifying information at the top of the code.
- Make sure your program is well commented.
- Format your output in an appropriate way.
- Money $, and two decimal places.
- Make sure to use constants where appropriate.
- Make sure your code is properly indented.
- Make sure your identifiers are properly formatted.
Required Files
One Java source code file.
Submission
Submit the assignment to the D2L folder Program 3 by the due date.