Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When the application is requested without any parameter, it displays the list of the vaccines and doses at the hospital as shown below: New Vaccine

When the application is requested without any parameter, it displays the list of the vaccines and doses at the hospital as shown below:

New Vaccine | New Doses -->blue links that redirect to the servlet

Vaccine Doses Required Days Between Doses Total Doses Received Total Doses Left
Pfizer/BioNTech 2 21 5000 5000 Edit
Johnson & Johnson 1 5000 5000 Edit

For each vaccine, the system displays the name of the vaccine, the number of doses required to fully vaccinate a patient, the number of days between doses if more than one dose is required, the total doses the hospital has received, and the total doses left (i.e. not yet given to patients).

Suppose the hospital receives a new type of vaccine, a user can add it to the system by clicking on New Vaccine, which will take the user to a page where a new vaccine can be added. For example:

Name
Doses Required 2
Days Between Doses
Add

Note that after a new type of vaccine is added, the application should redirect the user to the vaccine listing page. The Total Doses Received/Left of the new vaccine should be 0 as new doses will be added using the New Doses function.

Suppose the hospital receives a new shipment of vaccine doses, a user can add it to the system by clicking on New Doses, which will take the user to a page where the new number of doses can be added. For example:

Vaccine Pfizer/BioNTech
New Doses Received
Add

Note that the dropdown list must be dynamically generated based on the vaccines currently in the system. In other words, if a new vaccine was added using the New Vaccine function, it should be listed in the dropdown list.

After new doses are added, the application should redirect the user to the vaccine listing page, and the Total Doses Received/Left of the vaccine should be updated with the new doses added.

  • The vast majority of web applications can be considered as data + operations on the data, so first identify the data in this application and create the corresponding classes (e.g. Vaccine), then identify the operations in this application, e.g. display vaccines, add vaccine, add doses, and so on.
  • Create one servlet for each operation. If an operation involves form processing, use doGet() to display the form and doPost() to process the form.
  • To focus on the main functionality, we will assume that the users will always provide proper input - in other words, you do not need to implement any input validation.
  • Changes made by the users (e.g. new vaccines and doses) need to be stored in application scope but do not need to be saved to a file. Those changes will be lost after the application is unloaded or reloaded.
  • Do not spend too much time beautifying the user interface - you can do that in later assignments when we use JSP.

image text in transcribedimage text in transcribed

In this semester we will develop an online system to help a hypothetical local hospitul for ils COVID vaccination effort. The system will keep truck of both patient and vaccine information for the hospitul. In this assignment, we will focus on the vaccine part that manages vaccine information. 1. List Vaccines (30p) When the application is requested without any parameter, it displays the list of the vaccines and doses at the hospital as shown below New Vaccine New Doses Doses Required Days Between Doses Total Doses Recetved Total Doses Left Vaceine Plizer BioNTech 2 21 10000 10000 Edit Juhtsun & Julmusun! 5000 5000 Elit For cach vaccinc, the system displays the name of the vaccine, the number of doses required to fully vaccinute a patient, the number of days between doses if more than one dose is required, the total doses the hospital has received, and the local doses lell (i.c. not yet given to patients). Most COVID vaccines require 2 doses fully vaccinate a patient, and the 2 doses need to be separated by a period of time. For exumple: Pfizer: BioTech: 21 days Modema: 28 days AstraZenecar: 4-12 Weeks flo keep our system simple. we'll suy it 28 days) Sino Vac: 28 days Sputnik V: 31 days The most notable exception currently is Jotunson & Johnson, which only requires one duse. Tural Doses Ley will be calculated as Toral Dover Received - Duses Given to Patients. We will implement the patient part of the systein in future assignments in this assignment you can keep Total Doses Led the same as Total Doses Received 2. New Vivcine (30pl Suppose the hospital receives a new type of vaccine, a user can add it to the system by clicking on New Vaccine, which will take the user lo n page where it new vaccine can be added. For example: Name 2 Doses Required Days Between Loses Add Note that after a new type of vaccine is added, the application should redirect the user to the vaccine listing page. The Total Doses Received left of the new vaccine should be 0 as new doses will be added using the New Doses function. 3. New Doses (30p) Suppose the hospital receives a new shipment of vaccine doses, a user cun eded it the system by clicking on New Doves, which will take the user to a page where the new number of doses can be added. For example: Vaccine Pfizer/BioNTech New Doses Received Add Note that the dropdown list must be dynamically generated based on the vaccines currently in the system. In other words, il a new vaccine was achiel using the New Penceine function, it should be listed in the droplown list. After new doses are added, the application should redirect the user to the vaccine listing page, and the Total Doses Received left of the vaccine should be updated with the new doses added. 4. Idit Vaccine 130pt) Clicking on the Edit link of a vaccinc allows a user to edit the information about the vaccinc i but not the doses). For example: Name Johnson & Johnson Doses Required 1 Day's Between Duses Save Note that the form should be pre-tilled with the vaccine information to be edited. In particular, the required doses should be selected in the dropdown list. After a vaccine is edited, the application should redirect the user to the vaccinc listing page. Notes As I said in class, the vast majority of web applications can be considered as dute I uperations on the dulu, su first identify the data in this application and create the corresponding classes (eg, Vaccine), then identify the operations in this application, e.g.display vaccines, add vaccine, add doses, and so on. Create one serviet for cach operation. If an operation involves form processing, 1150 doger() to display the form and dopesto to process the form. To focus on the main functionality, we will assume that the users will always provide proper inpu. - in olher words, you do 1701 1ced to implement any inpul validation Changes made by the users (eg, new vaccines a doses) need to be stored in application scope but do not need to be saved to a lile. Those changes will be lost aller the application is unloaded or reloaded, and that's OK fur this assignment. Do not spend too much time beautifying the user interface - you can do that in later assignments when we use ISP. In this semester we will develop an online system to help a hypothetical local hospitul for ils COVID vaccination effort. The system will keep truck of both patient and vaccine information for the hospitul. In this assignment, we will focus on the vaccine part that manages vaccine information. 1. List Vaccines (30p) When the application is requested without any parameter, it displays the list of the vaccines and doses at the hospital as shown below New Vaccine New Doses Doses Required Days Between Doses Total Doses Recetved Total Doses Left Vaceine Plizer BioNTech 2 21 10000 10000 Edit Juhtsun & Julmusun! 5000 5000 Elit For cach vaccinc, the system displays the name of the vaccine, the number of doses required to fully vaccinute a patient, the number of days between doses if more than one dose is required, the total doses the hospital has received, and the local doses lell (i.c. not yet given to patients). Most COVID vaccines require 2 doses fully vaccinate a patient, and the 2 doses need to be separated by a period of time. For exumple: Pfizer: BioTech: 21 days Modema: 28 days AstraZenecar: 4-12 Weeks flo keep our system simple. we'll suy it 28 days) Sino Vac: 28 days Sputnik V: 31 days The most notable exception currently is Jotunson & Johnson, which only requires one duse. Tural Doses Ley will be calculated as Toral Dover Received - Duses Given to Patients. We will implement the patient part of the systein in future assignments in this assignment you can keep Total Doses Led the same as Total Doses Received 2. New Vivcine (30pl Suppose the hospital receives a new type of vaccine, a user can add it to the system by clicking on New Vaccine, which will take the user lo n page where it new vaccine can be added. For example: Name 2 Doses Required Days Between Loses Add Note that after a new type of vaccine is added, the application should redirect the user to the vaccine listing page. The Total Doses Received left of the new vaccine should be 0 as new doses will be added using the New Doses function. 3. New Doses (30p) Suppose the hospital receives a new shipment of vaccine doses, a user cun eded it the system by clicking on New Doves, which will take the user to a page where the new number of doses can be added. For example: Vaccine Pfizer/BioNTech New Doses Received Add Note that the dropdown list must be dynamically generated based on the vaccines currently in the system. In other words, il a new vaccine was achiel using the New Penceine function, it should be listed in the droplown list. After new doses are added, the application should redirect the user to the vaccine listing page, and the Total Doses Received left of the vaccine should be updated with the new doses added. 4. Idit Vaccine 130pt) Clicking on the Edit link of a vaccinc allows a user to edit the information about the vaccinc i but not the doses). For example: Name Johnson & Johnson Doses Required 1 Day's Between Duses Save Note that the form should be pre-tilled with the vaccine information to be edited. In particular, the required doses should be selected in the dropdown list. After a vaccine is edited, the application should redirect the user to the vaccinc listing page. Notes As I said in class, the vast majority of web applications can be considered as dute I uperations on the dulu, su first identify the data in this application and create the corresponding classes (eg, Vaccine), then identify the operations in this application, e.g.display vaccines, add vaccine, add doses, and so on. Create one serviet for cach operation. If an operation involves form processing, 1150 doger() to display the form and dopesto to process the form. To focus on the main functionality, we will assume that the users will always provide proper inpu. - in olher words, you do 1701 1ced to implement any inpul validation Changes made by the users (eg, new vaccines a doses) need to be stored in application scope but do not need to be saved to a lile. Those changes will be lost aller the application is unloaded or reloaded, and that's OK fur this assignment. Do not spend too much time beautifying the user interface - you can do that in later assignments when we use ISP

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

Step: 3

blur-text-image

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

Maximizing Corporate Value Through Mergers And Acquisitions A Strategic Growth Guide

Authors: Patrick A. Gaughan

1st Edition

1118108744, 9781118108741

More Books

Students also viewed these Accounting questions

Question

Define Heideggers terms throwness, Mitwelt, and Umwelt.

Answered: 1 week ago