Overview Schedule Announcements Resources Assignments Home

CSC 121: Computer Science I, Spring 2005

Project 3

A Bank Simulation - Queues
Deadline: 5:00pm, Monday, April 18

Items to do and point distribution:

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:

  1. (5 points) In Bank.resetSimulation(), initialize the fields that will record the bank-level statistics (there are seven of them).
  2. (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.
  3. (10 points) In Bank.runSimulation(), supply the code to choose which teller has the next scheduled finishing time.
  4. (10 points) Also in Bank.runSimulation(), write the code that processes the next event by updating the clock and calling either processArrival or processFinish.
  5. (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.
  6. (5 points) In Bank.recordEndOfService(), fill in the code to update the totalCustomerTime and maxCustomerTime (use the code in recordStartOfService as a model).
  7. (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.
  8. (10 points) In Teller.serve(), finish the code to calculate the next finish time for the teller.
  9. (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).
  10. (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).
  11. (10 points) Programming style, formatting (readability), and comments, especially describing methods.
Turning in your project:
When you are finished, copy your project to the appropriate folder under I:\CSC121\project-03 and send an email message to your instructor naming the members (1 or 2) of your team.
Overview Schedule Announcements Resources Assignments Home

Valid HTML 4.01!Valid CSS!DePauw University , Computer Science Department , Spring 2005
Maintained by Brian Howard ( bhoward@depauw.edu ). Last updated