Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 and
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, secs 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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started