Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Simple Program - would greatly appreciate assistance. Need help creating a simple java program that incorporates a jsp, a java class, and a servlet

Java Simple Program - would greatly appreciate assistance. Need help creating a simple java program that incorporates a jsp, a java class, and a servlet to create a credit card payment schedule. Inputs given by the user include first & last name, account number, balance to pay off, and percentage the user wants to pay off each month. The interest rate used should be 1.5%

image text in transcribedimage text in transcribed

^until balance is zero

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 wil: 1. Get the data from the request. 2. Create a CreditCard object 3. Use the CreditCard object to calculate the payment schedule table 4.Get table String and values from CreditCard object and incorporate it into the HTML for response to the client. Sample Output: Credit Payment Schedule Customer: Victor Allan Account #: 2222 Balance Due: $500.00 Month Interest Payment Balance 1 $7.50 $50.75 $456.75 2 $6.85 $46.36 $417.24 3 $6.26 $42.35 $381.15 4 $5.72 $38.69 $348.18 5$5.22 $35.34 $318.06 6 $4.77 $32.28 $290.55 7 $%4.36 $29.49 $265.42 8$3.98 $26.94 $242.46 9$3.64 $24.61 $221.49 10 $3.32 $22.48 $202.33 11 $3.03 $20.54 $184.83 12 $2.77 $18.76 $168.84 13 $2.53 $17.14 $154.23 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 wil: 1. Get the data from the request. 2. Create a CreditCard object 3. Use the CreditCard object to calculate the payment schedule table 4.Get table String and values from CreditCard object and incorporate it into the HTML for response to the client. Sample Output: Credit Payment Schedule Customer: Victor Allan Account #: 2222 Balance Due: $500.00 Month Interest Payment Balance 1 $7.50 $50.75 $456.75 2 $6.85 $46.36 $417.24 3 $6.26 $42.35 $381.15 4 $5.72 $38.69 $348.18 5$5.22 $35.34 $318.06 6 $4.77 $32.28 $290.55 7 $%4.36 $29.49 $265.42 8$3.98 $26.94 $242.46 9$3.64 $24.61 $221.49 10 $3.32 $22.48 $202.33 11 $3.03 $20.54 $184.83 12 $2.77 $18.76 $168.84 13 $2.53 $17.14 $154.23

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

5. Prepare for the role of interviewee

Answered: 1 week ago

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago