Question: Create a Java program that simulates 3 lines using queue. Scenario: First, there are 2 queues running at the same time(A and B) distribute 50

Create a Java program that simulates 3 lines using queue.

Scenario: First, there are 2 queues running at the same time(A and B) distribute 50 customer to these 2 queues however you like cusotmers are enqueued at random time intervals no more than 10 minutes apart. Then each customer from queue A and B must also go through queue C after going through their own queue. Each line has a "teller" that sometimes looks to see how long the queue for their line is and has a random time that it takes to process each customer. Use enqueue and dequeue to distribue the customers to the lines. The end of the simulation should show the total time it took for all 50 customer to go through the A-C or B-C queue.

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!