Logo Data Structures and Algorithms with Object-Oriented Design Patterns in C++
next up previous contents index

Linked List Implementation

 

In this section we will examine a pointer-based implementation of stacks that makes use of the LinkedList<T> data structure developed in Chapter gif. Program gif gives the declaration of the concrete object class StackAsLinkedList and its associated iterator, StackAsLinkedList::Iter. As in the preceding section, the function prototypes for the interface inherited from the Container base class have been elided for the sake of brevity. Of course, implementations must be provided for all of the inherited member functions which are declared pure in the base class.

   program5997
Program: StackAsLinkedList Class Definition




next up previous contents index

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