Name ___________________________
CSCI 2720
Data Structures
Spring 2007
Grading Sheet for Project 2 -- Binary Search Trees
The TreeNode class ____/ 10
contains the following, implemented properly:
constructor that permits specification of a data value, or a data value
and left child, or a data value and left child and right child
access methods for pointer fields
Tree Traversal functions ___/ 16
implemented properly:
method void InOrderVisit(TreeNode *t, void visit(T& item));
method void PreOrderVisit(TreeNode *t, void visit(T& item));
method void PostOrderVisit(TreeNode *t, void visit(T& item));
method void LevelScan(TreeNode *t, void(T& item));
The BinSTree class ___/24
contains the following methods, implemented properly:
method TreeNode *GetTreeNode(T item, TreeNode *lptr = NULL,
TreeNode *rptr = NULL);
method void FreeTreeNode(TreeNode *p);
method TreeNode *CopyTree(TreeNode *t);
method void DeleteTree (TreeNode *t);
method TreeNode *FindNode(const T& item, TreeNode* &parent) const;
method void PrintTree(TreeNode *t, int level);
method void PrintVTree(TreeNode *t, int dataWidth, int screenWidth);
method void CountLeaf(TreeNode *t, int &count);
method int Depth(TreeNode *t);
a default constructor
a copy constructor
a destructor
overloaded assignment operator
int Find(T& item);
void Insert(const T& item);
void Delete(const T& item);
void ClearTree(void);
int TreeEmpty(void) const;
int TreeSize(void) const;
void Update(constT& item);
TreeNode *GetRoot(void) const;
The main program
Program reads in prefix expressions and prints:
____/20 vertical representation of the expression tree using PrintVTree
____/05 infix form of the expression
____/05 postfix form of the expression
Style and form
____ /10 Code contains appropriate comments.
Header comments indicate author, date, name of file, purpose
of class or code.
Appropriate error-checking and error-handling.
Readable, maintainable code.
No "extraneous" code.
____ /10 Submission includes all necessary files, including makefile.
Program compiles and runs without modification.
"Readme" file provides sufficient documentation to
execute program.
---------------------
______/100