Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Array Implementation

Program gif introduces an array implementation of a deque. The DequeAsArray class extends the QueueAsArray class introduced in Program gif and implements the Deque interface defined in Program gif. The QueueAsArray class provides almost all the required functionality. Only five of the six methods introduced in the Deque interface need to be implemented.

   program7812
Program: DequeAsArray class ``Head'' methods.




next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.