Write a program that will monitor the flow of patients in a large hospital. The program should account for patients who check in and out of the hospital and should allow access to information about a given patient. In addition, the program should manage the scheduling of three operating rooms. Doctors make a request that includes a patient's name and a priority value between 1 and 10 that reflects the urgency of the operation. Patients are chosen for the operating room by priority value, and patients with the same priority are served on a first- come, first-served basis.
Write a program that will monitor the flow of patients in a large hospital. The program should account for patients who check in and out of the hospital and should allow access to information about a given patient. In addition, the program should manage the scheduling of three operating rooms. Doctors make a request that includes a patient's name and a priority value between 1 and 10 that reflects the urgency of the operation. Patients are chosen for the operating room by priority value, and patients with the same priority are served on a first- come, first-served basis.
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
Related questions
Question
c++ .I need the class in head file and test in cpp file.

Transcribed Image Text:Write a program that will monitor the flow of patients in a large hospital. The program should
account for patients who check in and out of the hospital and should allow access to
information about a given patient. In addition, the program should manage the scheduling of
three operating rooms. Doctors make a request that includes a patient's name and a priority
value between 1 and 10 that reflects the urgency of the operation. Patients are chosen for the
operating room by priority value, and patients with the same priority are served on a first-
come, first-served basis.
Please use a binary heap as the internal storage for the patient queue, which is a priority
queue. The patient queue processes its patient in order of increasing priority. The elements in
the queue are patients. Each patient has patient ID, name, priority, check in time, and check
out time. You may create a PatientQueue class with the following methods.
Member Name
Description
PatientQueue()
A constructor used to initialize a new empty queue.
"PatientQueue()
Free up any memory used
addPatient(patient);
Add the given person into your patient queue.
Remove the patient with the most urgent priority from your queue, and you should also return
their name as a string. Patients with the same priority are served on a first-come, first-served
processPatient()
basis.
In this function you should return the name of the most urgent patient (the person in the front
of your patient queue), without removing it or altering the state of the queue.
getFrontName()
getFrontPriority()
In this function you should return the integer priority of the most urgent patient (the person in
the front of your patient queue), without removing it or altering the state of the queue.
upgradePatient(patientID, newPriority);
Modify the priority of a given existing patient in the queue. The intent is to change the
patient's priority to be more urgent than its current value, perhaps because the patient's
condition has gotten worse.
isEmpty()
Return true if the patient queue does not contain any elements and false if it does contain at
least one patient.
clear();
Remove all elements from the patient queue, freeing memory for all nodes that are removed.
displayQueue()
Print the patient queue to the console. The elements should be printed out in front-to-back
order and must be in the form of priority:value, such as 2:Jason
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education