Assignment MVC: Loan Amortization Application (MVC)
What to do:
Write a Java Web application using the MVC design pattern that will calculate an amortization table for a loan.
An amortization table shows the monthly payment, the amount paid to interest, the amount paid down on the balance, and the monthly final balance over the life of a loan. When completed your application should produce the same output as your Loan Amortization with JSP assignment.
You must make the following components for this assignment:
Loan.java: This defines a loan object. The Loan object should have principal, monthly rate, and total term as fields. It should have at least two constructors, a getter/setter pair for each instance variable, a toString() method and a method that allows one to get a monthly payment. Here the Total Term is the total number of months in the life of the loan:
Monthly Payment = Principal * Monthly Rate / (1 - (1 + Monthly Rate) ^ -Total Term ))
(It's okay to reuse this class from a previous assignment assuming it was correct in that assignment.)
Amortization.java: This component will provide the amortization table portion of the output shown in Figures 1 and 2 when the doAmortization method is called. The Amortization class will include a Loan object as an instance variable. It will also have at least two constructors, a getter/setter pair for the instance variable, and a doAmortization method that will return a String containing the html based amortization table.
(It's okay to reuse this class from a previous assignment assuming it was correct in that assignment.)
Some other relationships that you will need to complete the view are:
index.jsp: an html form page that allows the user to enter the initial loan information. These should be entered as yearly values (APR and term in years). Use textboxes and buttons. When the form is submitted, the AmortizationServlet will be called to create the loan amortization output.
AmortizationServlet: a servlet page that will:
amortization.jsp: a view page that will: