Create and use queues
Develop a java program that simulates the queues in a bank.
Implement the event-driven simulation of a bank that this chapter described on pages 434 through 444. A queue of arrival events will represent the line of customers in the bank. Maintain the arrival events and departure events in an ADT event list, sorted by the time of the event.
Your program must count the customers and keep track of their cumulative waiting time. These statistics are sufficient to compute the average waiting time after the last event has been processed.
Display a trace of the events executed and a summary of the computed statistics (total number of arrivals and average time spent waiting in line).
In this section, the various input tables are described.
The Customer Table identifies the Customers coming into the bank, the time they arrive and the transactions they wish to perform. Note that a Customer may want to perform multiple transactions.
|Transaction Number||Customer ID||Arrival Time||Transaction Type|
The Transaction Type table identifies the duration for the teller to perform each Transaction Type.
|Transaction Type ID||Transaction Type Description||Duration|
The table below should be output to show the customers arrival time, the time waiting in line and the time they depart. This information should be used to calculate the total number of arrivals and the average wait time.
|Customer||Arrived||Waiting Time||At Teller||Transaction Time||Departed|
Submit the following:
- Test Cases
- UML diagram for the application
- Text file(s) containing the classes and methods
- Text file containing the results