Zach's A4 Solution
------------------

There are two solutions here:  EventSimulation and JobSimulation.

EventSimulation uses the MyPriorityQueue, as well as all the various Events.  It is completely driven by events, and does not maintain a currentTime variable.

JobSimulation uses only MyQueue (and could have done even without that) and uses only StartPrintJob events.  In this example, the simulation is driving the queue, rather than the other way around.


This would have been a good time to use packages.  There are too many files in this directory to find things easily.  I could have created:

events -- all the event classes:
          Event, StartPrintJob, EndPrintJob, DelayedPrintJob, EndSimulation

queue -- all the queue classes, interfaces, exceptions, and graders:
          Queue, MyQueue, MyPriorityQueue, Node, QueueFullException, 
          QueueEmptyException, QueueGrader, PriorityQueueGrader.

simulation -- the simulation classes, and their exceptions:
          EventSimulation, JobSimulation, SimulationHiccupException.

printers -- the printer class:
          Printer

However, I just left all the files in the current directory to make them easier to compile.


I have also included the generated javadoc pages if you care to read them.  Have a look at overview-tree.html to see how the classes are related.

Questions or comments?  Send to ztomasze@hawaii.edu.

--Zach.

