[Solved]4 Write Program Called Problem4cpp Using Queue Class Discussed Lecture Simulates 10 People Q37086924

4. Write a program called problem4.cpp using the Queue class that we discussed in lecture that simulates a 10 people standing in a queue for service. Each person that is removed from queue to get the service has a 50-50 chance of either getting his/her service done (and thus never returning back) or needing extra service and thus joins the queue again. Your program should require no input from the user, and should output the number of iterations (services) that gets performed until the queue is empty. Your program will need to first fill the queue with people numbered from 1-10, then simulate the above process and output the average queue size over the entire simulation (25 points) Show transcribed image text 4. Write a program called problem4.cpp using the Queue class that we discussed in lecture that simulates a 10 people standing in a queue for service. Each person that is removed from queue to get the service has a 50-50 chance of either getting his/her service done (and thus never returning back) or needing extra service and thus joins the queue again. Your program should require no input from the user, and should output the number of iterations (services) that gets performed until the queue is empty. Your program will need to first fill the queue with people numbered from 1-10, then simulate the above process and output the average queue size over the entire simulation (25 points)
Expert Answer
Answer to 4. Write a program called problem4.cpp using the Queue class that we discussed in lecture that simulates a 10 people sta… . . .
OR

