Chapter 19 Exercise Set 1: Queue Applications

  1. 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.

  2. Write another implementation of PriorityQueue that uses an array. It should also pass all the unit tests in test_priorityqueues.cpp.

  3. Test your PriorityQueue class by using it with one of the Card 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.