//  File: main1.C
//
//  Testing the BSTree class.

#include <stdio.h>
#include <stdlib.h>
#include "bstree.h"

main() {
   BSTree *Tptr, *temp ;

   Tptr = new BSTree ;
   Tptr->Insert(5) ;
   Tptr->Insert(2) ;
   Tptr->Insert(3) ;
   Tptr->Insert(8, 'x') ;
   Tptr->Insert(6, 'y') ;
   Tptr->Insert(9, 'z') ;

   printf("\nInorder Traversal:\n") ;
   Tptr->Inorder() ;
   printf("\n") ;

   printf("\nMin Item:\n") ;
   temp = Tptr->Min() ;
   temp->RootPrint() ;
   printf("\n") ;

   printf("\nMax Item:\n") ;
   (Tptr->Max())->RootPrint() ;
   printf("\n") ;

   printf("\nDelete entire tree:\n") ;
   delete Tptr ;
}
