Data Structures and Algorithms with Object-Oriented Design Patterns in Python
next up previous index

Instance Attributes

The implementation of the StackAsLinkedList class makes use of one instance attribute--an instance of the LinkedList class called _list. In addition, the StackAsLinkedList class inherits the _count instance attribute from the Container class. This list is used to keep track of the objects in the stack. As a result, there are as many elements in the linked list as there are objects in the stack.


next up previous index

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