|
|
|
Banking Simulation
|
|
|  |
by Rodney Hoffman Occidental College Los Angeles, California
 |
|
|  |
More Nifty Assignments...
Assignment
We wish to simulate a bank with a "feeder" line and n tellers. A new customer arrives every a minutes. The length of time needed to service a customer varies randomly from 2 to m minutes.
Over the course of t minutes, we want to know the following:
- Average wait in the system
- Average length of the "feeder" queue
- Longest wait required
- Number of customers served
Then we discuss what classes might be called for, what those classes might do, and so on. I usually then supply some partly written classes.
Teacher's Comment
If memory serves, I think I adapted this from some version of Mike Clancy's Oh, Pascal! long ago.
Contribute
If you would like to contribute your suggestions for nifty assignments, please submit your ideas.
|
|
|
|
|
|