/** * A simple priority queue for objects with integer key values */ public class HeapPriorityQueue implements PriorityQueue { // A Priority queue implemented as a binary heap using an array // to store the tree. // Add any variables and methods that you need below /** * Construct a new, empty priority queue */ public HeapPriorityQueue() { throw new UnsupportedOperationException(); } /** * Return the size of this queue * @return the number of items inserted and not yet removed from the queue */ public int size() { throw new UnsupportedOperationException(); } /** * Insert a new item in the queue * @param value item to be inserted into the queue * @param key priority of this item */ public void insert(Object value, int key) { throw new UnsupportedOperationException(); } /** * Return the item at the front of the queue without removing it * @return the item with the smallest priority in the queue */ public Object min() { throw new UnsupportedOperationException(); } /** * Remove the item at the front of the queue * @return the item with the smallest priority that was in the queue */ public Object removeMin() { throw new UnsupportedOperationException(); } /** * Change the priority of an item that is in the queue * @param value must be an object that is in the queue * @param newkey the new priority for this item */ public void replaceKey(Object value, int newkey) { throw new UnsupportedOperationException(); } }