A program creates a queue. The program takes array of user names as String and then...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A program creates a queue. The program takes array of user names as String and then performs following operations: If the user name starts with A to S, it will add (enqueue) to the queue If the user name starts with T to Z, it will remove (dequeue) one element from the queue and then add both the user names to the queue. What will the queue look like if the input array is as follows? Please clearly label front and rear of the queue. ["Saeed", "Akram", "Jamal", "Tanveer", "Usman", "Ahmed", "Dawood", "Waheed"] Please run the ticket counter simulation code with following parameters: a. Number of customers per day = 200 b. Single Customer Service Time = 5 minutes c. A customer arrives in the system every 20 seconds How many cashiers are needed to keep the average customer wait time below 10 minutes? A theatre has two (2) cashiers at reception who are available at 8:00am. The customers start arriving in theatre at time 8:00am and a new customer arrives every 50 seconds. Customers go directly to the available cashier or wait in a queue for cashier availability. Every customer requires 4 minutes to be processed by a cashier. What will be the total time (including wait in the queue and processing time) for the sixth customer? Briefly explain why? A program creates a queue. The program takes array of user names as String and then performs following operations: If the user name starts with A to S, it will add (enqueue) to the queue If the user name starts with T to Z, it will remove (dequeue) one element from the queue and then add both the user names to the queue. What will the queue look like if the input array is as follows? Please clearly label front and rear of the queue. ["Saeed", "Akram", "Jamal", "Tanveer", "Usman", "Ahmed", "Dawood", "Waheed"] Please run the ticket counter simulation code with following parameters: a. Number of customers per day = 200 b. Single Customer Service Time = 5 minutes c. A customer arrives in the system every 20 seconds How many cashiers are needed to keep the average customer wait time below 10 minutes? A theatre has two (2) cashiers at reception who are available at 8:00am. The customers start arriving in theatre at time 8:00am and a new customer arrives every 50 seconds. Customers go directly to the available cashier or wait in a queue for cashier availability. Every customer requires 4 minutes to be processed by a cashier. What will be the total time (including wait in the queue and processing time) for the sixth customer? Briefly explain why?
Expert Answer:
Answer rating: 100% (QA)
1 include 2 include 3 include 4 using namespace std 5 6 7 8 9 10 11 12 13 14 ... View the full answer
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these accounting questions
-
A movie theatre complex will raise its ticket price if the average ticket price of theatres in Southern California exceeds $7.50. A random sample of 36 theatres resulted in a mean of $7.80. The...
-
A customer service counter at a local bookstore is normally staffed by a single employee. The probabilities of arrival times and service times are shown in the following table: Simulate the arrival...
-
The average time (minutes) that a customer has to wait for the arrival of a cab after calling the company has been observed for random samples of size 4. The data for 20 such samples are shown in...
-
Poppins Company has the following: If 9,000 units are on hand at December 31, the cost of the ending inventory under FIFO is: (a) $99,000. (b) $108,000. (c) $113,000. (d) $117,000. Inventory, Jan. 1...
-
Henry invests $50,000 in an entity called Forward Investments on January 20, 2010. Communication Skills Under the terms of the investment agreement, the $50,000 is considered a loan that Forward will...
-
Suppose that Federal Reserve policy leads to higher interest rates in the United States. a. How will this policy affect real GDP in the short run if the United States is a closed economy? b. How will...
-
Where to find the law applicable to litigation matters
-
Sylvia Manufacturing Inc. had sales of $1,800,000 for the first quarter of 2012. In making the sales, the company incurred the following costs and expenses. Prepare a CVP income statement for the...
-
What are the effects of cultural congruence or incongruence between organizational culture and national or regional cultures on employee attitudes, behaviors, and organizational outcomes ?
-
A firm must decide between constructing a new facility or renting a comparable office space. There are two random outcomes for acquiring space, as shown in Figure PI 2-25. Each would accommodate the...
-
Commands, Help, and Path 1: In step 10, why did your script run instead of the ls executable? step 10) Now, let's have some fun. Use sudo nano (or sudo gedit if you like) to create a file in...
-
What is reframing, and how does it work to produce creative ideas?
-
What constitutes a true consensus?
-
How are the Standard Agenda and the functional perspective related?
-
How do the primary forms of power differ from each other?
-
What are supportive rules and how should they be established in a team?
-
Ginna earned a return of 12% on his coupon bond holdings this year. The value of these holdings is currently $15,000. At the start of the year, the value was $14,000. What was the dollar value of...
-
You are maintaining a subsidiary ledger account for Police-Training Expenditures for 2013. The following columns are used: Inventory purchases are initially recorded as expenditures. Record the...
-
Prove that in the procedure GRAHAM-SCAN, points p 1 and p m must be vertices of CH (Q).
-
Show that for any finite set S, the power set 2 S has 2 |S| elements (that is, there are 2 |S| distinct subsets of S).
-
Show that after all edges are processed by CONNECTED-COMPONENTS, two vertices are in the same connected component if and only if they are in the same set.
-
True or False. In the matrix iteration method, any computational error will not yield incorrect results.
-
A uniform simply supported beam carries two masses \(m_{1}\) and \(m_{2}\) with \(m_{2}=3 m_{1}\) as shown in Fig. 7.12. Find the fundamental natural frequency of the beam using Dunkerley's method....
-
Using Rayleigh's method, find the fundamental natural frequency of the torsional system shown in Fig. 6.11. Assume that \(J_{1}=J_{0}, J_{2}=2 J_{0}, J_{3}=3 J_{0}\), and \(k_{t 1}=k_{t 2}=k_{t...
Study smarter with the SolutionInn App