O'Reilly logo

Introducing Data Structures with Java by David Cousins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17

Case Study 4—A Queue Simulation

17.1 INTRODUCTION

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.

17.2 THE APPLICATION

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required