In Project 6 you created a queue that does not allow duplicates. In this project you will create a priority queue that does not allow duplicates. The function of the add operation should be analogous...


In Project 6 you created a queue that does not allow duplicates. In this project you will create a priority queue that does not allow duplicates. The function of the add operation should be analogous to the changed enqueue method in Project 6. In this case, the test for equals should not include the priority, so the header of the add method should be changed to the one given in the previous project. A new operation move will change the priority of a given item, if it is already in the priority queue. If the item is not in the priority queue, move will add it with the given priority. Create an interface for a priority queue that does not allow duplicates. Then write a class that implements this interface. Finally, write a program that adequately demonstrates your new class.

Nov 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here