Question: Use a queue to simulate the flow of bus transportation system. The passenger may be wait in the bus-station in a queue. In this


Use a queue to simulate the flow of bus transportation system. The

Use a queue to simulate the flow of bus transportation system. The passenger may be wait in the bus-station in a queue. In this simulation you have the following details: one waiting queue Every one minute one passenger should take his ticket and served. (Note that the passenger may have to wait in the line before being served) Every minute many passengers (between 0 and 2) may be added to the queue. You can simulate the flow of passengers through the queue during a time of period N minutes long Your simulation system will keep track of the following: The total number of passengers served The total wait time of all passengers The passenger that waits the maximum period of time in the queue. Test your simulation code according to the following table Longest Wait and which passenger Time Total Number of in minutes Passengers Served Average Wait 30 82 200 610

Step by Step Solution

3.51 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include include include using namespace std class to represent t... View full answer

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 Computer Engineering Questions!