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

Member Variables

The implementation the NaryTree class is very similar to that of the GeneralTree class. The NaryTree class definition also comprises three member variables--key, degree, and subtree. The first, key, represents to the root node of the tree. It is a pointer to an Object. The second, an unsigned integer constant degree, records the degree of the root node of the tree. The third, subtree, is an array of pointers to NaryTree instances. It is declared by instantiating the Array<T> template class for tex2html_wrap_inline63928. This array contains pointers to the subtrees of the given tree.


next up previous contents index

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