PROJECT 2 SUMMER 2002 |
---|
Back to Projects Main Page |
Write a program IN JAVA that simulates a checkout line at a supermarket. The line is a queue object. Customers (i.e. customer objects) arrive in random integer intervals of 1 to 5 minutes. Also each customer is serviced in random integer intervals of 1 to 5 minutes. Obviously the rates need to be balanced. If the average arrival rate is larger than the average service rate , the queue will grow infinitely. Even with balanced rates randomness can cause long lines. Run the supermarket simulation for a 12 hour day (720 minutes) using the following algorithm:
|
GUI |
---|
The GUI should consist of an Applet The Applet should have the following components that generate the appropriate events:
|
The Applet should be displayable using the appletviewer. A security file would be needed in order for the applet to be able to access the output file. There is no requirement for the applet to work with a regular browser (this would require more advanced security concepts). |
You needd to submit on a floppy the following:
|
Grading:
|