The class BST declared in Program represents binary search trees. Since binary trees and binary search trees are topologically similar, the BST class is derived from the BinaryTree class given in Section . In addition, because it represents search trees, the BST class is also derived from the SearchTree class.
As shown in Program the BST class inherits much of its functionality from the BinaryTree base class. However, several functions are overridden, including AttachKey, DetachKey, Left and Right. In addition a new function, Balance, has been added to the protected interface. The purpose of this function is to support the AVL class discussed in Section .