Question: Please help Your lab is to: Download the template application, review, compile and run the application: PriorityQueueTest Add a toString() method to class Task, so
Please help
Your lab is to: Download the template application, review, compile and run the application: PriorityQueueTest Add a toString() method to class Task, so you can display the instance variables of each task object. This method should display both instance variables in a proper format. The PriorityQueue task contains a heap, which is essentially an array. The problem in this implementation is that all arrays start at index 0. This implementation incorrectly adds 1 more to the heap and starts at index 1 instead of index 0. Fix this error so the heap starts correctly at index 0. Add a show() method to the PriorityQueue which will display each of the active tasks on the heap Add an option 7 to the PriorityQueueTest, which will call the show() method. Again, this method should only display active tasks on the heap, showing them in proper priority order. Module 11 Lab is worth 15 points. To receive full credit for this lab, submit your .java file along with a run log: show a Priority Queue of at least 4 deep show that the heap if empty add tasks of varying priority to show how the heap is reorganized with the highest priority task at the top of the heap, until the heap is full show that the heap is full remove a task show the heap to show that the highest priority task was removed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
