Lengkap

restaurant

The problem is to simulate a sales operations in McM's. In this problem you will write a program to simulate customers being served in favorite fast food restaurant. The maximum configuration of the establishment will be on the first line of input. It will determine the number of drive though lanes and the number of registers serving the people in the restaurant. Initially all registers are closed i.e. no customer will be served before one has been opened. A register (or a drive through lane) can be activated or closed at any time, you decide when. These changes of status will take effect on the following time unit. When a register is opened a line (queue) is to be created for the people waiting to be served, and two other queues for the people who have purchased their meal, but have not been served yet, to wait for their meal. There will be one of these wait queues for each of the drive through lanes. There is no limit to the length of the queues in which people are waiting to be served, but each queue where people are waiting for their order can only have 3 customers at any time, with the exception of the drive through lanes which can handle 4 customers. Each sales person can serve one customer at any time unit. A sales person who is taking care of one of the drive through lanes has to also take care of one of the registers. This forces the person to decide, who to service next, the drive through or the restaurant queue. At the time of sale the customer will decide how many items they will order. The wait time for the order is 3 time units per item. In the simulation the number of items will be determined by a random number generator. At most 10 items per purchase. We will talk about the random number generator and seeding it in the class on Monday April 15. In this simulation an arbitrary number of customers will enter the restaurant at any time unit. You will know whether they come into the restaurant or enter a drive through lane. Each of them will need to be assigned a unique customer number and be placed into one of the queues, which one is up to you. A customer cannot be placed into the drive though lane queue unless he/she is a drive though customer and same applies to in restaurant customers.

## Deliverables

Any time unit an open register or an open drive though lane can process single order as long as there is room in one of the order wait queues for that register or drive through lane. Be smart on how you place customers into queues, if there is extra wait the customers are not happy and will be lost. They will not want to wait more than 25 time units and if they have waited over 15 time units they are unhappy about the service. Once a customer is within the next three to be served, the line the customer is waiting cannot be changed. If the line is changed the customer will have to enter at the end of the line. For every register that is open for sales, but does no sales for more than 2 time units, it will cost one sale for every time unit past two that it does no sales. (NO penalty if the register is held up because the wait lines are full.) Your job is to design a queuing system that will serve as many people as possible and as few people as possible will leave without eating and of course maximize the number of sales. Commands and the data will come from stdin, and output will go to stdout. The input line can contain any of the following info: First line - three numbers: 2 7 1234 2 - maximum number of drive through lanes 7 - maximum number of in restaurant registers 1234 - value to use to seed the random number generator Rest of the lines - two numbers and an optional command: 1 8 p 1 - a single customer enters into drive though lanes 8 - 8 customers entered the restaurant and are to be placed into queues p - if a p is present at the end of the line, print out the content of all queues in a nice understandable format Output from the p commad needs to include the customer sequence number and the number of time units the customer has waited for service. The simulation ends after the last line of input has been processed. The last line of the input will contain -1 -1. At this time you are to print out the content of the queues and final statistics: total number of customers total number of items sold number of customers served in restaurant number of customers served in drive though lane number of unhappy customers number of customers that left without getting served number of customers that switched queues total number of item costs lost due to the extra registers being open average time a customer waited before ordering average time a customer waited after ordering Part of this assignment is a Makefile which builds an executable called mcm

## Platform

c++(unix based g++)

Kemahiran: Pengaturcaraan C, Kejuruteraan, MySQL, PHP, Kejuruteraan Perisian, Ujian Perisian

Lihat lagi: unix service, statistics problem, smart platform, smart input, smart and final, sales person on line, rest programming, problem statistics, problem of statistics, problem in statistics, problem and statistics, people who know to use after effect, one line programming job, job assignment problem, info job customer service, how to design your room, getting a job in programming, first programming job, design seed, c programming random number

Tentang Majikan:
( 1 ulasan ) Romania

ID Projek: #2847017

Dianugerahkan kepada:

elmiguel409

See private message.

$12 USD dalam 14 hari
(35 Ulasan)
4.3

7 pekerja bebas membida secara purata $19 untuk pekerjaan ini

sanatanvw

See private message.

$21.25 USD dalam 14 hari
(72 Ulasan)
5.5
pickingapples

See private message.

$21.25 USD dalam 14 hari
(43 Ulasan)
4.8
vasilevalaiba

See private message.

$21.25 USD dalam 14 hari
(9 Ulasan)
2.5
fallcool

See private message.

$21.25 USD dalam 14 hari
(3 Ulasan)
1.1
vijendervw

See private message.

$21.25 USD dalam 14 hari
(4 Ulasan)
0.4
jabaswavika

See private message.

$12.75 USD dalam 14 hari
(1 Ulasan)
0.9