Mortgage Calculator: Create a mortgage calculator that you have seen at various bank websites in JavaScript. It is basically a form that has the following text fields:
From the principal amount, the interest rate, and the loan period you
will calculate the monthly payment, the sum of all payments and the
total amount paid in interest. The formula is given below:
R = P * r / (1 - (1 / (1 + r)n))
where
R = monthly payment
P = principal loan amount
r = monthly interest rate (yearly rate divided by 12)
n = number of months
If any non-numeric values or negative numbers are entered an alert box should warn the user and the computation halted. Round the number of months to the nearest integer, in case the user inputs a fractional value. Round all computed answers to two decimal places.
You may have the JavaScript embedded in your HTML code. But your mortagage calculator must laid out neatly. When you have finished the assignment, put a link in the table in your index.html page by 11 PM Monday, 10 Oct 2016. You do not need to send me or the teaching assistants any e-mail notification.