// File: main.C
//
// Use the Box class.


#include <iostream.h>
#include <iomanip.h>
#include <stdlib.h>
#include "box.h"

void foo() ;

void foo() {
   Box one, two ;
   
   Box::report() ;
}

main() {
   Box b1, b2(0.5, 2.5, 3.0), b3(1.1, 3.0, 3.5) ; 
   int r ;

   cout << "b1: " ;
   b1.identify() ;
   cout << "b2: " ;
   b2.identify() ;
   cout << "b3: " ;
   b3.identify() ;
   
   Box::report() ;
   foo() ;

   r = compare(b1,b2) ;
   if (r < 0) {
      cout << "Box b1 fits inside box b2" << endl ;
   } else if (r > 0) {
      cout << "Box b2 fits inside box b1" << endl ;
   } else {
      cout << "Boxes b1 and b2 are incomparable" << endl ;
   }

   r = compare(b1,b3) ;
   if (r < 0) {
      cout << "Box b1 fits inside box b3" << endl ;
   } else if (r > 0) {
      cout << "Box b3 fits inside box b1" << endl ;
   } else {
      cout << "Boxes b1 and b3 are incomparable" << endl ;
   }

   r = compare(b2,b3) ;
   if (r < 0) {
      cout << "Box b2 fits inside box b3" << endl ;
   } else if (r > 0) {
      cout << "Box b3 fits inside box b2" << endl ;
   } else {
      cout << "Boxes b2 and b3 are incomparable" << endl ;
   }
   
   Box::report() ;
}
