CSSE 230: Priority Queue

The purpose of this exercise is to learn about binary heaps.
  1. Work on this exercise by yourself.
  2. Implement a MyPriorityQueue class as documented at: Priority Queue. Ensure you use the method signatures as specified.
  3. Please implement all methods except for the comparator(), T[] toArray(T[] a) and spliterator() methods.
  4. You only need to implement the first constructor, i.e. the one with no parameters.
  5. You must implement the MyPriorityQueue by extending ArrayList or by haveing an ArrayList as a field. In eiher case, you must take maximum advantage of inheritance.
  6. You must implement the MyPriorityQueue through a BinaryHeap and ensure that the critical operations (add, offer and poll) run in O(log(n)) time. See the documentation for more information.
  7. Use this test-suite as well as test cases of your own design to debug your software.
  8. Submit your project to the appropriate drop-box on Moodle.