d**********8 发帖数: 129 | 1 Given the following interfaces,
1. public interface QueueItem {
2.
3. /**
4. * Returns the priority of this item. The priority is guaranteed to be
5. * between 0 and 99, where 0 is lowest and 99 is highest priority.
6. */
7. public int priority();
8. }
9.
10. public interface PriorityQueue {
11.
12. /**
13. * Inserts a queue item into the priority queue.
14. */
15. public void insert(QueueItem q);
16.
17. /**
18. * Returns the item with the highest priority.
19. */ |
|