数据库代写 | ISYS1055 Database Concepts Assessment 4 Database Design Project

Java代写/Java数据结构/Java基础开发/Java代码代做/Java编程

Suppose you are invited to develop a simulation program for the operations of an emergency room in a local hospital in order to analyze the waiting time of incoming patients.

The incoming patients will be initially inspected for classifying into one of three categories. The patients will then be arranged to wait at a priority queue based on their severity of illness. Patients with same category will be served on a first-come, first-served basis. The waiting patients will be served at a limited number of beds with same resources. The patient waiting queue is limited in size and the incoming patients will go away if the queue is full. Incoming patients with the category severe will be transferred to other hospital if their serving time exceeds the simulation time. The service time of each newpatient is computed by ServiceTimeFactor * (category + 1), where Service Time Factor is a constant, say, 5.

Initially, all free beds are arranged in a FIFO queue. The bed at which a patient is served will be assigned to another FIFO queue. The bed will be arranged back to the free queue when the patient has been completed the service.

The amount of simulation time will be initially specified in a limited number of time units. New patient may come at each time unit during the simulation based on an initially specified fixed probability (chance of new patient arrival). If this probability is greater than or equal to
the random number (1~100) generated at each time unit, a new patient will come to the emergency room.

Before the simulation starts, the user needs to input the simulation parameters:
1. Simulation time (max is 1000)
2. Maximum service time of patients (max is 50)
3. Chance of new patient arrival (0% ~100%)
4. Number of beds (max is 20)
5. Patient queue limit (max is 50)

You are given some classes of singly linked list (to be downloaded from Moodle). You have
to use them to implement the required priority queue and FIFO queues.