The commands to be supported are:
Add an item into the queue at a given priority, e.g.
Priority: 1
Item:item 1
Print the current contents of the queue.
1: item 1, next item, …
…
9: my item, …
Reverse – toggle the priority order of the queue, e.g.
9: my item, …
…
1: item 1, next item, …
Remove the highest priority item form the queue and print it, e.g.
Removed: my item
Specifications of the priority queue:
·Items added into queue may have priority in range 0 to 9
·Initially, 0 is the highest priority.
·Within one priority level, items should be maintained as FIFO.
Hints:
· It is not imperative that you complete application.
· Parts of application you did not finished comment:
1.Why did you not implement?
2.How would you implement?
===========================================