Question: Problem: To complete this assignment you need to use the source code provided under Programming Assignment 6 starter folder uploaded under week 7 assignment section.

Problem: To complete this assignment you need to use the source code provided under Programming Assignment 6 starter folder uploaded under week 7 assignment section.

Enhance the car wash simulation method so that it has the following additional property. There is an additional parameter, which is a maximum length for the queue. When the queue gets as long as this maximum, any customer who arrives will leave without entering the queue (because the customer does not want to wait that long). There should also be one additional simulation result that is printed. In addition to the output given below, the method should print the number of simulated customers who left because the queue was too long. Embed the method in a program that allows the user to repeat simulations with different arguments until the user wishes to quit the program.

Seconds to wash one car: 240

Probability of customer arrival during a second: 0.0025

Total simulation seconds: 6000

Customers served: 19

Average wait: 305.57894736842104 sec

Another output

Seconds to wash one car: 240

Probability of customer arrival during a second: 0.0025

Total simulation seconds: 6000

Customers served: 12

Average wait: 99.25 sec

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!