home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / CPTUTOR2.ZIP / BOX.CPP < prev    next >
Text File  |  1990-07-20  |  502b  |  32 lines

  1.                                  // Chapter 5 - Program 8
  2. #include "box.hpp"
  3.  
  4.  
  5. box::box(void)        //Constructor implementation
  6. {
  7.    length = 8;
  8.    width = 8;
  9. }
  10.  
  11.  
  12. // This method will set a box size to the two input parameters
  13. void box::set(int new_length, int new_width)
  14. {
  15.    length = new_length;
  16.    width = new_width;
  17. }
  18.  
  19.  
  20. box::~box(void)       //Destructor
  21. {
  22.    length = 0;
  23.    width = 0;
  24. }
  25.  
  26.  
  27.  
  28.  
  29. // Result of execution
  30. //
  31. // This implementation file cannot be executed
  32.