/* File: box.h

   Third (and final?) attempt at defining a box class.
*/

#ifndef _box_h
#define _box_h

class Box {
   friend int compare(Box, Box) ;   /* see below */

public:

   Box() ;			/* the default constructor */
   Box(float,float,float) ;	/* another constructor */

   void identify() ;		/* prints out vital stats */
   float volume() ;		/* volume of the box */
   void grow() ;		/* double box dimensions */
   void shrink() ;		/* halve box dimensions */

   void debug() ;		/* for illustration purposes */

protected: /* sort of private. allows access from derived classes */

   float length ;	/* box length */
   float height ;	/* box height */
   float width ;	/* box width */

private:  /* really private */

   static int count ;	/* static means shared */
   float random() ;	/* private random function */
} ;


/* Returns -1 if first box fits in second
	    1 if second box fits in first
	    0 if neither
*/

int compare(Box, Box) ;


#endif
