Question: Java Servlet JSP Simple Project Scenario/Information: If you carry a balance on a credit card, it can be nice to see how long it would
Java Servlet JSP Simple Project
Scenario/Information: If you carry a balance on a credit card, it can be nice to see how long it would take to payoff the card. For this scenario, you should design a Java Web application the displays a credit card payment schedule.
Inputs for your program should include: Customers name (first and last), the account number (as an integer), the current balance (as double) and the percent of the balance that will paid off each month (i.e. 5% as double). Your program should use the Java Scanner class to allow the user to enter the input from the Eclipse console.
After receiving the input, return a report to the client that displays a table of payments. Sample output is shown below.
Assume the following:
-At the beginning of every month 1.5% interest is added to the balance. -The customer payment will be calculated using the monthly balance (including the interest) and the Percent to Pay input. -The ending balance can be calculated using: beginning balance + interest - payment. -Assume that when the monthly ending balance is less than the initial monthly payment, the customer can afford to pay off the remainder (plus interest) in the next month. -You can use the Java NumberFormat class to make values appear as currency when printed.
Required Components:
You should make the following components for this assignment: index.jsp: an html form page that allows the user to enter the input data. Use textboxes and buttons. When the form is submitted, the Servlet class will be called to create the output.
CreditCard.java: This defines a credit card object. This component represents a credit card account. Fields are included that represent the input data. In addition to Constructors and getters/setters, this component includes a method that will create a String. The String should contain the html and content of the output table.
CardServlet: A servlet that will: Get the data from the request. Create a CreditCard object Use the CreditCard object to calculate the payment schedule table Get table String and values from CreditCard object and incorporate it into the HTML for response to the client.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
