Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The most common use of Max-Heap priority queues is in simulation. A simulation of a hospital waiting room, for example, might prioritize patients waiting based

The most common use of Max-Heap priority queues is in simulation. A simulation of a hospital waiting room, for example, might prioritize patients waiting based on the severity of their need. For example, doctors in a hospital emergency room often choose to see next the "most critical" patient rather than the one who arrived first.

You are asked to develop a simple program for doctors and administrators to dynamically keep track of treatment scheduling for patients according to priority in the hospital emergency room. A patient with a more critical problem will pre-empt others even if they have been waiting longer.

Programming Requirements:

1. The dynamic scheduling software application MUST be written in Java and is required to use Max-Heap Priority Queue approach.

2. This Max-Heap priority queue, where elements are prioritized relative to each other and when a patient's treatment is finished, the software is asked to Extract-Max(S) one patient with the highest priority in the queue that is removed.

3. The priority queue implemented in a Max-Heap Tree will store a collection of structs that keep track of the patient's name and an integer for the priority. Larger integers are considered higher priority than smaller ones (Assuming each time there are 20 patients in the MAX-Heap tree only.)

4. The software MUST at least contains the following functions:

1. Max-Heapify()

2. Build-Max-Heap()

3. Heapsort()

4. Max-Heap-Insert()

5. Heap-Extract-Max

6. Heap-Increase-Key

7. Heap-Maximum

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

How can you defend against SQL injection attacks?

Answered: 1 week ago