#include // to define NULL #include "RuntimeException.h" class BinaryNode { private: friend class BinaryTree; friend class BinarySearchTree; int key; BinaryNode *left, *right; long searchcost; public: BinaryNode(int el = 0, long el2 =0, BinaryNode *lt = NULL, BinaryNode *rt = NULL) : //constructor key(el), searchcost(el2), left(lt), right(rt) { } // functions BinaryNode *getLeft() { return left; } BinaryNode *getRight() { return right; } int getElem() { return key; } long size(BinaryNode *t); int height(BinaryNode *t); BinaryNode *copy(); };