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

Tree Traversals

 

Program gif introduces the AbstractTree class. The AbstractTree class extends the AbstractContainer class introduced in Program gif and it implements the Tree interface defined in Program gif. The AbstractTree class provides default implementations for both the DepthFirstTraversal and BreadthFirstTraversal methods. Both of these implementations access abstract properties, such as Key, and call abstract methods, such as and GetSubtree. In effect, they are abstract algorithms . An abstract algorithm describes behavior in the absence of implementation!




next up previous contents index

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