BST

Due 10/4/2013

Develop a class to store student data.
struct node{
node * left;
int ID;//key
char name[20];
float average;
node *right;
};
struct data{
int ID;//key
char name[20];
float average;
}

class binarySearchTree{
private:
node *T;
public:
binarySearchTree(){T=NULL}
void insertStudent(int I, char N[], float A){…}
****************void deleteStudent(int I){…}
void printInorder(){…}
void printPreorder(){…}
void printPostorder(){…}
int isBalanced(){…}
int depth(){…}
int numberOfTerminals(){…}
int maxID(){…}
int minID(){…}
int size(){…}
data search(int I){…}
}; //binary search tree
void main(){
binarSearchTree X;
X.insertStudent(200,”ali”,90.7);
X. insertStudent(100,”sami”,67.3);
X. insertStudent(200,”ahmad”,80.6);
cout<X.size();
X.printInorder();
X.deleteStudent(200);
X.printInorder();
…
}