Question: We will begin creating a hospital simulation. In this assignment, we will start with the intake of the hospital: There are three types of intakes:

We will begin creating a hospital simulation.
In this assignment, we will start with the intake of the hospital:
There are three types of intakes: general, emergency, and appointment.
There are two queues where an intake task could arrive at the front desk or emergency.
There should be a nurse (thread) at each location who will determine the type and severity of the patient.
All intakes have a severity between 1 and 5.
Emergency intakes can happen at both locations. General and appointments should be sent to the front from
emergency.
Emergency patients should be seen before any other patients, then general, then appointment.
Patients should be seen in terms of the severity of their injuries.
There will be three queues that intakes can go into after processing. One is for emergency only, and then
two are shared between the others.
There will be three doctors taking patients off these queues. They will treat the patients and release them.
More severe injuries take longer, 5=1.5 secs,1=0.5 sec.
Intakes
Intakes have the following attributes:
Severity
Type
ID
Patient Name
Print Statements
Have print statements for all important stages:
Task created
Entered into intake queue
Moved between queues
Processed by an intake nurse
Started treatment by the doctor
Released
Running
Create 25 intakes with various severities and types and have them progress through the hospital. In java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!