stonewt.h 685 B

12345678910111213141516171819
  1. // stonewt.h -- definition for the Stonewt class
  2. #ifndef STONEWT_H_
  3. #define STONEWT_H_
  4. class Stonewt
  5. {
  6. private:
  7. enum {Lbs_per_stn = 14}; // pounds per stone
  8. int stone; // whole stones
  9. double pds_left; // fractional pounds
  10. double pounds; // entire weight in pounds
  11. public:
  12. Stonewt(double lbs); // constructor for double pounds
  13. Stonewt(int stn, double lbs); // constructor for stone, lbs
  14. Stonewt(); // default constructor
  15. ~Stonewt();
  16. void show_lbs() const; // show weight in pounds format
  17. void show_stn() const; // show weight in stone format
  18. };
  19. #endif