Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

5. If yes, then why?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago