/***************************************************************************************** File vehicle.h Description Provides a generic Vehicle class and two classes (Automobile and Truck) that are built on the generic Vehicle class. Include File Dependencies string.h iostream.h mystring.h iomanip.h Change History 06/19/98 (thh) Initial Definition based on modifications to code provided with Instructor's Manual to accompany Programming Languages Paradigm and Practice, 2nd Edition by Doris Appleby and Julius J. VandeKopple, McGraw Hill, 1997. *****************************************************************************************/ #ifndef VEHICLE_H_INCLUDED #define VEHICLE_H_INCLUDED #include #include #include "Mystring.h" #include // Interface definition of a base class defining a vehicle: class Vehicle { public: Vehicle (const mystring &,const mystring &); ~Vehicle() {}; virtual void display(); private: mystring type; // Type of vehicle, e.g., auto or truck mystring LicNum; // License number of vehicle }; // Interface definition of a derived class based on the vehicle base class class Automobile : public Vehicle { public: Automobile(const mystring &, int ); ~Automobile() {}; virtual void display(); private: int NumPass; }; // Interface definition of a derived class based on the vehicle base class class Truck : public Vehicle { public: Truck(const mystring &, float ); ~Truck() {}; virtual void display(); private: float GWeight; }; #endif