[an error occurred while processing this directive]
[an error occurred while processing this directive]In this sub-project, you will implement two classes:
B_tree |
---|
- tree_root:B_tree_node |
+ create():B_tree + size():Integer + empty():Boolean + root():B_tree_node + count( in obj:Type ):Integer + insert( in obj:Type ) + destroy() |
This class stores a finite ordered set of n (zero or more) elements stored in B+-tree nodes. If there are zero elements in the tree, the tree is said to be empty. Each element is stored in an instance of the B_tree_node<Type> class. By default, an empty B+-tree has a single empty B+-tree node, the address of which is stored in tree_root. Unlike the singly-linked list class, the B+-tree class, for the most part, simply makes the appropriate function call.
The one class variable is
B_tree()
This constructor creates an empty B_tree_node<Type> and assigns this to the member variable tree_root.
The destructor must delete all the nodes in the B+-tree in some manner.
There is no copy constructor in this class.
There is no assignment operator in this class.
This class has four accessors:
This class has one mutator: