Question: Design a queue management system in C + + that calculates how long it will take for each roller coaster to handle its line based

Design a queue management system in C++ that calculates how long it will take for each roller coaster to handle its line based on its ride capacity and duration per cycle.
3.1 Prompt the user to enter the number of riders waiting in line for each roller coaster:
Coaster A: "Red Rail" Maximum Occupancy:10 Ride Duration:3 Minutes
Coaster B: "Blue Rail" Maximum Occupancy:15 Ride Duration:2 Minutes
Coaster C: "Green Line Maximum Occupancy:10 Ride Duration: 5 Minutes
(15 Marks)
3.2 Calculate the total number of ride cycles required for each coaster to clear its entire queue, considering that each cycle should accommodate up to the maximum capacity or the remaining number of riders, whichever is less.
(15 Marks)
3.3 Multiply the number of cycles by the ride duration per cycle to calculate the total wait time (in minutes) required for each coaster to process all its riders.
(15 Marks)
3.4 At the end of the calculation, print the total wait time (in minutes) for each coaster to process all riders in its queue.
(5 Marks)
 Design a queue management system in C++ that calculates how long

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!