Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Vehicle
- {
- public:
- unsigned int get_number_of_wheels() const;
- unsigned int get_max_speed() const;
- Location& get_start_point() const;
- Location& get_destination() const;
- protected:
- unsigned int number_of_wheels;
- unsigned int max_speed;
- Location start_point; //made-up class Location
- Location destination; //made-up class Location
- };
- class Passenger_Vehicle : public Vehicle
- {
- public:
- unsigned int get_number_of_passengers() const;
- unsigned int get_number_of_doors() const;
- private:
- unsigned int number_of_passengers;
- unsigned int number_of_doors;
- };
- class Freight_Vehicle: public Vehicle
- {
- public:
- unsigned int get_max_payload() const;
- void load_freight_vehicle();
- Load& unload_freight_vehicle(); //made-up class Load
- private:
- unsigned int max_payload;
- };
Add Comment
Please, Sign In to add comment