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 that calculates how long it will take for each roller coaster to handle its line based on its ride capacity and duration per cycle.
Prompt the user to enter the number of riders waiting in line for each roller coaster:
Coaster A: "Red Rail" Maximum Occupancy: Ride Duration: Minutes
Coaster B: "Blue Rail" Maximum Occupancy: Ride Duration: Minutes
Coaster C: "Green Line Maximum Occupancy: Ride Duration: Minutes
Marks
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.
Marks
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.
Marks
At the end of the calculation, print the total wait time in minutes for each coaster to process all riders in its queue.
Marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
