Tree data structures provide a great application of many object-oriented programming principles.
Abstract class interfaces allow you to impose a uniform interface for different tree types or tree implementations, and have it all be transparent to the user.
Template method pattern is a pattern that involves creating functional hooks (before/after hooks), so-called "template methods". These are useful for doing things like customizing a tree traversal.
Generic type/template interfaces are useful for storing arbitrary data in trees - templated tree node classes are useful because the data stored in the tree is not usually material to the schema of the tree itself.
Comparison operator implementation and overloading comparison operator behavior for objects is also extremely useful to be able to do, as it allows you to perform comparisons to store sorted trees.
Exceptions are a must. Proper exception handling, and good exception-handling practices, can be practiced with trees.
See also: OOP Checklist
TreesPart of Computer Science Notes
Series on Data Structures
Abstract data type: Trees/ADT
Preorder traversal: Trees/Preorder
Postorder traversal: Trees/Postorder
In-Order traversal: Binary Trees/Inorder
Breadth-First Search: BFS
Breadth-First Traversal: BFT
Depth-First Search: DFS
Depth-First Traversal: DFT
Finding Minimum in Log N Time: Tree/LogN Min Search
Abstract data type: Binary Trees/ADT
Flags · Template:TreesFlagBase · e