Question: Hello, I need help with this assignment. Along with explanation if possible. (Please include UML diagram) B: Project description Design a generic ADT Priority Queue

Hello, I need help with this assignment. Along with explanation if possible. (Please include UML diagram)

B: Project description Design a generic ADT Priority Queue which is implementedwith a generic ADT Heap, and use it store comparable objects ofany type. For example, a priority queue can be used to storea set of employees, students or bank accounts. Employee and its comparators:

B: Project description Design a generic ADT Priority Queue which is implemented with a generic ADT Heap, and use it store comparable objects of any type. For example, a priority queue can be used to store a set of employees, students or bank accounts. Employee and its comparators: (Note: these classes are needed for testing the generic ADT Priority Queue and the generic ADT Heap that will be discussed later.) An ADT Priority Queue can be used to store comparable objects of any type according to their priority. By default, the priority is determined by objects' natural ordering. Default priority can be overridden by a Comparator provided when a queue is constructed. Let's use Employee as an example. Assume that each employee object contains two unique values: name: a full name in a format as in "John Smith". pay rate: a numeric value indicating the annual income of an employee. Assume we store a list of employees using an ADT priority queue according to their names or their pay rates. Therefore, we need to create two comparators. A name comparator: compares/sorts employees by their names. A pay rate comparator: compares/sorts employees by their pay rates. To organize employees in a priority queue, we first create an empty priority queue with a reference to a comparator passed into the constructor as the ordering for the queue (more accurately for the heap that is used to implement the queue. We will discuss heap later.). And then, insert the employees into the queue according to their priority defined the comparator. name name pay rate James Butt 30000.00 Josephine Darakjy 4500.00 Art Venere 12000.00 Lenna Paprock 500.00 Donette Foller 30005.00 This study reso red via Course fo.com

Step by Step Solution

3.41 Rating (145 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Generic ADT Heap Implementation Generic ADT Priority Queue I... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!