Question: In this assignment, you will use fixed arrays to represent the queues. In this assignment you will create at least 4 queues to simulate such

In this assignment, you will use fixed arrays to represent the queues. In this assignment you will create at least 4 queues to simulate such a queueing system in a supermarket. You can assume that each customer has a unique name (ie. Create a pool of Strings eg.50 to assign to each queue). The program will randomly assign the names to the queues (so some queues will eventually be longer than other queues). Every time when assigning, the difference in length of one queue compared to others is more than 3, you will dequeue from the back of the queue and reassign randomly to one of the other queues. Eventually you will have 4 queues (The longest and shortest queue will differ by at most 3).

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!