Professional Documents
Culture Documents
Bank (Warner)
The driver program sets up the simulation, and
CustomerFactory (owns and invokes)
creates a Customer_Factory, a Teller_Factory
and an instance of a Bank
Creates and owns the clock, the Customer_Queue, TellerFactory (owns and invokes)
(a balking queue) and the Teller_Queue.
Tells the Customer_Factory and Teller_Factory Clock (creates, owns and invokes)
to set up all arrival events
Executes events (and may print the events)
Customer_Queue (creates and owns)
Creates and owns the Statistician, invokes the
Statistician to generate the final report.
Bank_Event (Warner)
Abstract class, must be prioritizable.
Specifies that events must have a firing time and a Clock (manipulates and invokes events at this
fire method.
abstract level)
All the events of the simulation are subclasses of
Bank_Event
Bank_Event extended by:
Customer_Arrival_Event,
Customer_Balk_Event,
Transaction_Start_Event,
Transaction_Done_Event,
Teller_Arrival_Event, Lunch_Start_Event,
Lunch_Done_Event, Teller_Decision_Event,
and Go_Home_Event
Bank (owns)
Bank (manipulates and invokes events at this
abstract level)
Clock (Warner)
Schedules Events
PriorityQueue (Warner)
Workhorse for the clock