You have been hired as a consultant by Fifth Third Bank to
evaluate the arrangement of tellers and waiting lines in one of
their branches. Your team is not the first to get this job; another
firm created a partially-working simulation before all of their
programmers quit because they thought the bank's name was too
silly. Your task is to complete the simulation and use it to
determine an optimum number of tellers and waiting lines for the
branch.
Copy the project I:\CSC121\public\Bank to your
own folder, and then open it in BlueJ. You will find various items
labeled TODO in the source files; these are the pieces that the
previous team left undone. You will need to become familiar with
the interfaces of several of the classes, for example the Queue
class. For your efforts in completing this project, you will be
awarded the following point values:
- (5 points) In Bank.resetSimulation(), initialize the fields
that will record the bank-level statistics (there are seven of
them).
- (15 points) Also in Bank.resetSimulation(), fill in the code
needed to set up the tellers and queues in the case of a single
shared queue.
- (10 points) In Bank.runSimulation(), supply the code to choose
which teller has the next scheduled finishing time.
- (10 points) Also in Bank.runSimulation(), write the code that
processes the next event by updating the clock and calling either
processArrival or processFinish.
- (10 points) In Bank.processArrival(), replace the code that
randomly chooses a teller with code that will behave more
intelligently: choose an idle teller if there is one, or else
choose the teller with the shortest waiting line.
- (5 points) In Bank.recordEndOfService(), fill in the code to
update the totalCustomerTime and maxCustomerTime (use the code in
recordStartOfService as a model).
- (10 points) In Queue.enqueue(), finish the code so the customer
is added to the end of the queue, and make sure the maximumLength
statistic is properly updated.
- (10 points) In Teller.serve(), finish the code to calculate the
next finish time for the teller.
- (10 points) Change the default simulation parameters so that
the service times range from 5 to 9 minutes, and then adjust the
number of tellers so that no more than a few customers are left in
line at the end of the day (but don't add so many tellers that they
spend a lot of time idle).
- (5 points) Run the simulation enough times to decide whether it
is better to have a single queue or multiple queues, then change
the default value for the field named multipleQueues to reflect the
better choice (in terms of customer waiting times).
- (10 points) Programming style, formatting (readability), and
comments, especially describing methods.