March 2013
Intermediate to advanced
416 pages
9h 41m
English
Chapter 10 introduced the topic of queues including the priority queue, which holds items in the order of some defined criterion. This case study will build an application to simulate such a queue. It also includes the process of writing data to a disk file as described in Chapter 4.
Checking in for a flight includes being given a boarding card printed with a seat number for the aircraft cabin. However, many low-cost airline operators do not allocate seats at check-in, leaving passengers to pick one when they board instead. An attempt is made to avoid a free-for-all from developing as a result, as follows:
When booking a budget flight, it is often possible at extra cost ...