Skip to Main Content
Introducing Data Structures with Java
book

Introducing Data Structures with Java

by David Cousins
March 2013
Intermediate to advanced content levelIntermediate to advanced
416 pages
9h 41m
English
Pearson Education India
Content preview from Introducing Data Structures with Java

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures and Algorithms Using Java

Data Structures and Algorithms Using Java

William McAllister

Publisher Resources

ISBN: 9788131758649