// ModNode.h // word consists of a Pair // parent is pointing to parent of ModNode // left is pointing to left child of ModNode // right is pointing to right child of ModNode // this node is derived from Node // this class is derived from Node using public inheritance #ifndef MODNODE_CLASS #define MODNODE_CLASS #include "Pair.h" #include "Node.h" template class ModNode : public Node { private: ModNode * parent; public: // default constructor // initializes all data members to default values ModNode(); // constructor with Pair p // other data members are set to default values ModNode(T p); // constructor with data members set to // p, prnt (parent), l (left) and r (right), respectively ModNode(T p, ModNode *prnt, ModNode *l, ModNode *r); // returns pointer to the Modnode parent points to ModNode * getParent(); // mutator - changes value of parent to y void setParent(ModNode * y); private: // you may put any other private methods here }; #endif // MODNODE_CLASS