Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
Program introduces the AbstractTree class. The AbstractTree class extends the AbstractContainer class introduced in Program and it implements the Tree interface defined in Program . 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!