Grading criteria:

I checked if you implemented your stacks and queues properly (the queue needed to be array based, the stack needed to be linked list based).

I checked to see if the content of your prog2 class was appropriate. Your prog2 should contain only the main method for your program, and the main method should not do any parsing or validation of packets. It should delegate the Parsing to the Packet class, and only catch any exceptions that might be generated.

I checked the encapsulation of your Packet and Router classes. The Packet class should only store Packet information. It should store the parsed information, and not just the raw String. The Router class should contain the three required data structures and implement the receivePacket method. Instance variables of these classes should not be static and should be declared private.

Use of the static keyword is rarely appropriate and potentially dangerous. Improper uses include: declaring data that should be associated with an individual instance of a class as static, using static variables to hold data local to a single function, and using static functions when private non-static functions would work just as well.

I took off points for pervasive issues with output in their own category, rather than on every test case that had the issue. One thing I noted, but did not take off points for, was incorrect error message format. Your error messages should match the example error messages exactly. On future assignments, I will start deducting points for this, and I will start being more strict on matching the output format of the provided example. See the notes for recitation from the week of October 6 for how to use the diff program to check your output format.

When you are commenting your programs, you should put a block comment at the top of each file with the names of both group members in it. You should precede each class with a comment indicating what the class does, and each method with a comment explaining the method and its inputs and return value, if any. I will continue to look for comments on future assignments, including in files that are reused from previous assignments, so go back and comment your existing files if they are not sufficiently commented.