Answered step by step
Verified Expert Solution
Link Copied!

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 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

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago