Java Reference
In-Depth Information
Queues, Deques,
and Priority
Queues
Chapter
10
Contents
The ADT Queue
A Problem Solved: Simulating a Waiting Line
A Problem Solved: Computing the Capital Gain in a Sale of Stock
Java Class Library: The Interface Queue
The ADT Deque
A Problem Solved: Computing the Capital Gain in a Sale of Stock
Java Class Library: The Interface Deque
Java Class Library: The Class ArrayDeque
The ADT Priority Queue
A Problem Solved: Tracking Your Assignments
Java Class Library: The Class PriorityQueue
Prerequisites
Appendix D
Designing Classes
Chapter
5
Stacks
Chapter
8
An Introduction to Sorting
Objectives
After studying this chapter, you should be able to
Describe the operations of the ADT queue
Use a queue to simulate a waiting line
Use a queue in a program that organizes data in a first-in, first-out manner
Describe the operations of the ADT deque
Use a deque in a program that organizes data chronologically and can operate on both the oldest and newest entries
Describe the operations of the ADT priority queue
Use a priority queue in a program that organizes data objects according to their priorities
 
 
 
Search WWH ::




Custom Search