I was wondering if anybody out there could help me on this, I need to create a priority queue, more specifically I need help on the dequeue method. For this, I need to remove the object with the highest priority and return it, but if more than one object of identical priority exists, then the object that has been in the queue longest must be removed and returned. FIFO order needs to be preserved and if the queue is empty null should be returned.
(yes this part of my assignment that my professor made due on the 25th by midnight, what a great x-mas, I may)