Question: (JAVA) Queue: Q4(A) : A program performs the following operations on an empty queue Q: Q.enqueue(24) Q.enqueue(74) Q.enqueue(34) Q.first() Q.dequeue() Q.enqueue(12) Q.dequeue() Please show the
(JAVA) Queue:
Q4(A): A program performs the following operations on an empty queue Q:
Q.enqueue(24)
Q.enqueue(74)
Q.enqueue(34)
Q.first()
Q.dequeue()
Q.enqueue(12)
Q.dequeue()
Please show the queue contents at the end of these operations. Clearly show the front and rear of the queue.
Q4(B). Please run the ticket counter simulation code with following parameters:
a. Number of customers per day = 200
b. Single Customer Service Time = 5 minutes
c. A customer arrives in the system every 20 seconds How many cashiers are needed to keep the average customer wait time below 10 minutes?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
