Hi Guys,
I want to make a program and in that program I want to make a composition relations.
Eg. I have a class of "Vehicle" and a class of "Bus".
Vehicle class has general data members which are inherited by class "Bus".
But I wanted to know that how can I show composition relations between these 2 classes of "Vehicle" and "Bus"?
eg.
Now how can i show a composition relation between class "Bus" and the "Vehicle"?Code:class Vehicle { private : int regno; char name; public: get int regno(); get char name(); }; class Bus : public Vehicle { private: char buscolor; public: get int regno(); get char name(); };
Thanks



2Likes
LinkBack URL
About LinkBacks



