Question: write program in c using linked List, Queue A boarding gate at the airport is using a ticket verification machine to reduce manpower. There are

write program in c using linked List, Queue
A boarding gate at the airport is using a ticket verification machine to reduce manpower. There are 4 ticket checking lanes (1,2,3,4); before passengers enter a lane, a supervisor assigns them to a specific lane. Once assigned, passengers wait at the end of their designated lane. The operational principle of the verification machine is as follows: During each check, the machine verifies passengers at the front of each lane and selects the passenger with the longest scheduled flight time. In case of ties in flight times, priority is given based on higher ticket class (there are 3 ticket classes: 1,2,3, with increasing priority accordingly). If passengers have the same ticket class, priority is given to the passenger standing in the lane with the smallest lane number.
Create a menu to carry out the ticket verification process for the automatic machine (assume all tickets are valid) with the following options:
-11: Add a specified number of passengers from the keyboard.
22: Verify a specified number of passengers from the keyboard.
-33: Verify all remaining passengers.
- Option 0: Exit
The information of a passenger includes: Name of the passenger, ID number (automatically generated in the order they are entered from the keyboard, with the first passenger assigned ID 1), assigned lane, ticket class (1,2,3). Validate the entered information. The information displayed on the screen for options 2 and 3 includes: Name of the passenger, ID, ticket class, verification order in that round (each selection from the menu is considered one round, and the first verified passenger will have order 1). Each piece of information should be printed on a separate line

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!