See the attached file:
Create a Java servlet derived from the HttpServlet class which calculates the costs associated
with purchasing and caring for a pet for the first year. When the doGet() method is invoked the servlet will return an
HTML form with the following fields: (pet size, pet type)
The form will also have a submit button with the label “Show Costs” which generates a POST request to the same servlet.
The doPost() method of the servlet will take the fields passed in from the HTML form and test to see if the fields are valid.
If the values are not valid an error message describing the problem will be returned and the original form will be displayed.
If the values are valid then the values will be used to look up the costs based on the table in the document (attached, page 2)
The data entered will then be displayed along with the costs breakdown, first for Capital costs then for Annual costs (this
is the reverse of what is shown in the table). Any line items that do not have a cost for the particular animal will not be
A button will be provided to return the user to the entry screen. All numbers are assumed to be doubles.
Each web page must list the names and student ids of all of the students that worked on the project and provide a brief
description of what the program does.
4 freelancers are bidding on average $41 for this job
I have experience in java servlets for many years. I can do this. If you like my work you otherwise payment is not needed. Reply me so that i can start the work.