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,
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 (e.g., 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 Our Queue OXOX " 22- - 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
