Hospital XX has a program to manage patient queues with the following criteria: 1. Queue priority is set based on the patient’s condition in the following order: Critical > Serious > Fair > Good 2. If the patient has the same condition then First In First Served 3. There are two types of events: ADD and CALL 4. ADD to insert patient to the queue 5. CALL to move the patient into the room based on condition: a. If patient in “Critical” Condition then move to Emergency Room b. If patient in “Serious” Condition then move to the Examination Room c. If patient in “Fair” or “Good” Condition move to the Consultation Room Try implementing Double Linked List into the Hospital XX program using C FORMAT INPUT The first line contains an integer N events. Each event containsthree variables String C1, String C2, String C3. String C1 with format “C1 C2 C3” FORMAT OUTPUT If “CALL” is triggered then 1. If patient in “Critical” Condition then the output format will be : “C2 is in the Emergency Room” 2. If patient in “Serious” Condition then the output format w

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Hospital XX has a program to manage patient queues with the following criteria:
1. Queue priority is set based on the patient’s condition in the following order: Critical > Serious > Fair
> Good
2. If the patient has the same condition then First In First Served
3. There are two types of events: ADD and CALL
4. ADD to insert patient to the queue
5. CALL to move the patient into the room based on condition:
a. If patient in “Critical” Condition then move to Emergency Room
b. If patient in “Serious” Condition then move to the Examination Room
c. If patient in “Fair” or “Good” Condition move to the Consultation Room
Try implementing Double Linked List into the Hospital XX program using C
FORMAT INPUT
The first line contains an integer N events. Each event containsthree variables String C1, String C2, String
C3. String C1 with format “C1 C2 C3”

FORMAT OUTPUT
If “CALL” is triggered then
1. If patient in “Critical” Condition then the output format will be : “C2 is in the Emergency Room”
2. If patient in “Serious” Condition then the output format will be : “C2 is in the Examination Room”
3. If patient in “Fair” or “Good” Condition then the output format will be : “C2 is in the Consultation
Room”
Print the remaining patients in Waiting Room. If there is no patient then print None
CONSTRAINTS
1≤N≤100
C1 will contain “ADD” or “CALL”
3≤|C2|≤30
C3 will contain “Good”,”Fair”,”Serious” or “Critical”

PLEASE HELP SIR, I NEED THE ANSWER IN ONE HOUR, THX. PLEASE SIR.

D Page view A Read aloud V Draw
E Highlight
O Erase
of 7
Sample 1:
9
ADD Roddy Good
ADD Celine Fair
ADD Berry Good
CALL
Celine is in the Consultation Room
ADD Ronny Critical
ADD Belany Serious
CALL
Ronny is in the Emergency Room
CALL
Belany is in the Examination Room
CALL
Roddy is in the Consultation Room
Waiting Room: Berry
Process exited after 0.05033 seconds with return value e
Press anykey to continue . .
Sample 2:
ADD Roddy Good
ADD Celine Fair
ADD Ronny Critical
ADD Belany Serious
CALL
Ronny is in the Emergency Room
CALL
Belany is in the Examination Room
Waiting Room: Celine, Berry
Process exited after 0.04427 seconds with return value e
Press any key to continue . . .
Transcribed Image Text:D Page view A Read aloud V Draw E Highlight O Erase of 7 Sample 1: 9 ADD Roddy Good ADD Celine Fair ADD Berry Good CALL Celine is in the Consultation Room ADD Ronny Critical ADD Belany Serious CALL Ronny is in the Emergency Room CALL Belany is in the Examination Room CALL Roddy is in the Consultation Room Waiting Room: Berry Process exited after 0.05033 seconds with return value e Press anykey to continue . . Sample 2: ADD Roddy Good ADD Celine Fair ADD Ronny Critical ADD Belany Serious CALL Ronny is in the Emergency Room CALL Belany is in the Examination Room Waiting Room: Celine, Berry Process exited after 0.04427 seconds with return value e Press any key to continue . . .
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education