Question: The program should be written in Java language. Example product list. You are supposed to implement a supermarket simulation in this assignment. The supermarket is

The program should be written in Java language.

The program should be written in Java language. Example product list. Youare supposed to implement a supermarket simulation in this assignment. The supermarket

Example product list.

is opened at 09:00:00 and customers may enter until 17:00:00. After 17:00:00

You are supposed to implement a supermarket simulation in this assignment. The supermarket is opened at 09:00:00 and customers may enter until 17:00:00. After 17:00:00 only the customers who have been waiting in the queues will be processed and the supermarket will be closed. The customers will arrive at the supermarket by random time intervals vary ing between 2 and 15 minutes. Each customer will spend random amount of time between 2 and 30 min utes while choosing products to buy. They will select from 1000 different products. Note that they may select 1 to 20 different products. From the products they choose, they buy 1-5 samples. Each cashier will have their own queue. Customers who are going to pay will first look for empty queues. If there are multiple cashiers available, they will select a random one to pay. If there is only one empty queue, they will choose it. If there are no empty queues, half of the customers will look for the shortest queue, the other half will choose a random queue to wait in. You are supposed to implement a supermarket simulation in this assignment. The supermarket is opened at 09:00:00 and customers may enter until 17:00:00. After 17:00:00 only the customers who have been waiting in the queues will be processed and the supermarket will be closed. The customers will arrive at the supermarket by random time intervals vary ing between 2 and 15 minutes. Each customer will spend random amount of time between 2 and 30 min utes while choosing products to buy. They will select from 1000 different products. Note that they may select 1 to 20 different products. From the products they choose, they buy 1-5 samples. Each cashier will have their own queue. Customers who are going to pay will first look for empty queues. If there are multiple cashiers available, they will select a random one to pay. If there is only one empty queue, they will choose it. If there are no empty queues, half of the customers will look for the shortest queue, the other half will choose a random queue to wait in

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!