Question: java Part A: Design and implement a circular array-based queue based on the method in the lectures. Implement the following operations: enqueue, dequeue, front, size,

java  java Part A: Design and implement a circular array-based queue based
on the method in the lectures. Implement the following operations: enqueue, dequeue,

Part A: Design and implement a circular array-based queue based on the method in the lectures. Implement the following operations: enqueue, dequeue, front, size, isEmpty, and is Full. Make sure that your program checks when the queue is full in the enqueue operation, and when the queue is empty in the dequeue operation Test your implementation. We spend a lot of time waiting in lines. Poor management of queues (waiting lines) can result in delays in service, customer dissatisfaction and loss of business. Queuing Theory studies how to operate a queuing system in the most effective way to balance the cost of providing service leg., number of servers) with the time customers must spend waiting in line. So, let's study this a little bit with a simple simulation. Part B: Use your queue implementation to simulate a bank with 3 tellers and one line. The time between arrival of customers is a random integer between 1 and 5. When a customer arrives, the customer gets in line. When any of the three tellers is available, the first customer in line goes to that teller. The time to process that customer's transaction is another random integer between 1 and 5. When the transaction is completed, the customer leaves. Run the simulation for 100 customers. Report the average time the customer waits in the queue. Service Out Queue -2 2 OX 2 http://book.transtutors.com/cmsimg/9391_multiple%20channel%20queue.jpg Part D: Modify your implementation for part B so that each teller has a separate queue. When customers arrive, they enter the shortest queue (and stay in that one, never switching queues). Run both versions of the algorithm for an identical set of 100 customers with the same arrival and transaction times. Part D: Modify your implementation for part B so that each teller has a separate queue. When customers arrive, they enter the shortest queue (and stay in that one, never switching queues) Run both versions of the algorithm for an identical set of 100 customers with the same arrival and transaction times, Compare the average wait time for the two methods. Which seems to be better? Mservers with Mqueues Mservers with 1 queue Vs https://goldenratiphi.files.wordpress.com/2013/05/servers.png Part.E: Think about the validity of the above experiment. Does it reliably determine the best approach? How might you improve the experiment to get a better understanding of the differences between the two methods

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!