The problem

Honest Joe's Fine Used Cars has hired you to construct its web site. One of the most common questions their customers will have is "How much is this car going to cost me each month?" To help their customers out, Honest Joe and Company will want you to put a monthly payment calculator on the site.

The calculator should look something like this.

Since Honest Joe's charges a uniform rate of 5.9% annual interest on its car loans, the only thing customers will need to enter in the calculator is the amount of the car loan and the loan duration. Available loan durations should be one of the following: 36, 48, or 60 months.

Computing the monthly payment

As explained on this site the formula for computing a monthly payment is

where r is the monthly interest rate, n is the duration of the loan in months, and P is the amount of the loan.

To compute this formula you will need to be able to compute powers in JavaScript. The JavaScript code to compute a power

xy

is

Math.pow(x,y)

Due Date

This assignment is due by the start of class on Friday, April 19.