Question: * In Java * I run a bank and I want the optimal number of bank tellers. I watch my bank for a day. I
In Java
I run a bank and I want the optimal number of bank tellers.
I watch my bank for a day. I look at the time when people come in and how long they spend at a teller and I store this data in a text file.
My bank is a typical bank, everyone waits in one line and gets a teller as one becomes available. It is not like a supermarket where there are multiple lines for multiple checkouts.
The text file looks like this:
At time two people entered the bank. One had a transaction that required seconds, another had a transaction that required seconds. At time seconds, someone else entered the bank and had a second transaction.
If we had teller, what would the average wait time be ~ seconds
If we had tellers, what would the average wait time be ~ seconds
tellers: seconds
Write software to read this file and simulate for an arbitrary number of tellers. Calculate the average wait time for customers given Ntellers.
Testing output, you should match approximately these values:
teller, average wait ~ seconds
tellers, average wait ~ seconds
tellers, average wait ~ seconds
tellers, average wait ~ seconds
tellers, average wait seconds
Hints:
It is valuable to store the pairs of information in a dedicated class. We can then implement a doubleended queue, for example:
Deque insidecustomers new LinkedList;
You should create classes representing Customers, Tellers, and likely several objects representing different lines
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
