IN C++
Create a base class for transit system, called Automobile.Automobile has derived classes which is bicycle and Train.Both usea base class access spec of protected.
Automobile memb:
protected:
Automobile ID (str) manufacturer (str)capacity (int) status(char)
public:
constructor takes in Automobile ID, manufacture, capacity,
status virtual “display information on automobile” function
virtual destructor
Bicycle members:
Private
mileage (int) tire size (str) fuel type (str)
public: constructor intakes mileage, tire size,and fuel type, in addition to the 4 parameters for automobile
virtual “display information on bicycle-type automobile”function.
virtual destructor
Train members:
Private members:
power on time in hrs (int) motor type (str) next wheelinspection date (str)
Public members:
constructor taking hrs, motor type and wheel date, in additionto the four
PayPal Gateway not configured
PayPal Gateway not configured