CSE 382 Algorithms and Data Structures

Barbara Nostrand, Ph.D.

Electrical Engineering and Computer Science

Laboratory 7 - Supermarket


Simulate a checkout area of a supermarket consisting of one super-express counter,  two express counters,nbsp; and numStandLines standard counters.  All customers with numSuper or fiewer items proceed to a super-express counter with the fewest customers, p; unless there is a free express or regular line,  and those with between numSuper and numExp proceed to the express counter with the shortest line unless there is a free standard line. 

The number of items bought will be a random numer in the range 1 to maxItems.  The time required to process a customer is 5 seconds per item. 

Calculate the following statistics: 

Your program will require the following inputs from the user: 
numSuperThe number of items allowed in the super-express line. 
numExpThe number of items allowed in the express line. 
numStandLinesThe number of regular lines. 
arrivalRateThe arrival rate of customers per hour. 
maxItemsThe maximum number of items. 
maxSimTimeThe simulation time. 


Phrases you should now understand:


CollaborationYou will complete this project with your lab partner. 
ImplementationYou must implement your system as a Java application.  You may use Jgrasp.  Do not use netbeans or produce a Java applet. 
EnvironmentYour program must execute on the podium computer in our classroom.
Turn inYou must turn in both a report containing complete program sources and an executable electronic version of your program.

Last modified: 2008 FEB 11