public interface IRouter { //pre - p is a valid packet //post - p has been added to the input queue // p has been added to the service level queue if appropriate public void addPacket(Packet p); //pre - packetID may or may not be a valid packetID //post - if packetID was the ID of a packet on the input queue // that packet has been removed from the input queue, and // from any service queues it belonged to // Returns the packet or null public Packet removePacket(int packetID); //pre - none //post - if the input queue is empty, do nothing // if the input queue is not empty, process a packet // from the input queue. The selection of the packet // to process should be done according to the writeup. public void processPacket(); //pre - option is a number betwee 1 and 4 //post - print the contents of the specified queue // 1 - input queue // 2 - service level high queue // 3 - output queue for port 0 // 4 - output queue for port 1 // RIW - the return value of print will always be true // since the preconditions ensure option is valid 3/22/12 public boolean print(int option); }