Chapter 19 Exercise Set 1: Queue Applications¶
Create a
PriorityQueue
class that inherits from LinkedList.h without changing it in any way (i.e. You can’t touch it!) Your implementation should pass the unit tests in test_priorityqueues.cpp.Write another implementation of
PriorityQueue
that uses an array. It should also pass all the unit tests in test_priorityqueues.cpp.Test your
PriorityQueue
class by using it with one of theCard
objects you created back in Chapter 13 Exercise Set 0: Chapter Review. If you insert a random collection of cards into the priority queue and then remove them, they should come out sorted.