# A local movie theater has three ticket windows and two computerized

Content type
User Generated
Rating
Showing Page:
1/12
A local movie theater has three ticket windows and two
computerized ticket kiosks. Some transactions, such as
group discounts, can only be done at the ticket windows.
An arriving customer looks at the lines and chooses to
stand in the shortest one that can handle his or her
transaction. Group sales take four minutes to process.
Normal ticket sales take two minutes at a window and
three minutes at a kiosk. Internet ticket sales pickups take
one minute at a kiosk and two minutes at a window.
Write a simulation of this process using queues to
represent the five lines. The data set should consist of
randomly arranged customer arrivals, with 5% group sales,
20% Internet ticket sales, and 75% regular ticket sales. A
data set will consist of 20 customers. All of the customers
tend to arrive shortly before the start of a movie, so we are
simplifying the simulation to say that they all arrive at the
same time. From this simulation the theater wants to
determine the maximum length of each line, the average
waiting time for each line, and the time required for each
line to empty.
Hint: Think about using a list to create the data set by
adding 10 group, 40 Internet, and 150 regular customers
and then shuffling the list. This list is then traversed,
transferring each customer to the shortest queue that can
handle the customer\'s transaction.
Step 1 -- Write out the classes/objects/variables that you
will need to develop the simulation.
Step 2 -- Write out the process (pseudocode) for how the
simulation will run
Step 3 -- Write the code

Showing Page:
2/12
Solution
Hi, for this problem i use two class:
solution
Customers ( for encapsulate type and delay in queue )
Look at the code, as i comment there and the you can look
at the logic there too.
but to put it simple i follow the suggestions from your
problem, but as this is a multipart question, my code have
implicit the logic and pseudocode, and of course the code
itself :). Hope it helps! ( You will need to make the items
maxlenght, avertime and timetoEmpty of queues, should be
easy. (I recommend to ask separately next time. )
Code:
#include <iostream>
#include <queue>
#include <lists>
#include <algorithm> // std::shuffle
#include <array> // std::array
#include <random> // std::default_random_engine
#include <chrono> // std::chrono::system_clock
using namespace std;

Showing Page:
3/12

End of Preview - Want to read all 12 pages?
Access Now
Unformatted Attachment Preview
A local movie theater has three ticket windows and two computerized ticket kiosks. Some transactions, such as group discounts, can only be done at the ticket windows. An arriving customer looks at the lines and chooses to stand in the shortest one that can handle his or her transaction. Group sales take four minutes to process. Normal ticket sales take two minutes at a window and three minutes at a kiosk. Internet ticket sales pickups take one minute at a kiosk and two minutes at a window. Write a simulation of this process using queues to represent the five lines. The data set should consist of randomly arranged customer arrivals, with 5% group sales, 20% Internet ticket sales, and 75% regular ticket sales. A data set will consist of 20 customers. A ll of the customers tend to arrive shortly before the start of a movie, so we are simplifying the simulation to say that they all arrive at the same time. From this simulation the theater wants to determine the maximum length of each line, the average waiting time for each line, and the time required for each line to empty. Hint: Think about using a list to create the data set by adding 10 group, 40 Internet, and 150 regular customers and then shuffling the list. This list is then traversed, transferring each customer to the shortest queue that can handle the customer\'s transaction. Step 1 -- Write out the classes/objects/variables that you will need to develop the simulation. Step 2 -- Write out the process (pseudocode) for how ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
Just what I needed…Fantastic!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4