home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / DOOG / CPTUTOR2.ZIP / ANSWERS.ZIP / CH07_3A.HPP < prev    next >
Text File  |  1990-07-20  |  401b  |  20 lines

  1.                              // Chapter 7 - Programming exercise 3
  2. #include "vehicle.hpp"
  3.  
  4. class truck : public vehicle {
  5.    int passenger_load;
  6.    float payload;
  7. public:
  8.    void init_truck(int how_many = 2, float max_load = 24000.0);
  9.    float efficiency(void);
  10.    int passengers(void);
  11.    int total_weight(void);
  12. };
  13.  
  14.  
  15.  
  16.  
  17. // Result of execution
  18. //
  19. // (this file cannot be executed)
  20.