0

Why to do inheritance if we can make objects of a class in othet classes?

1st May 2018, 4:32 PM
manjul
manjul - avatar
2 Answers
0
Hmm I don't understand what you have written. Inheritance is for cleaner code and for time saving. You have to write all components in base class and now you inherits from that class instead of copying all to those classes.
14th May 2018, 3:05 PM
MichaƂ Biernacki
MichaƂ Biernacki - avatar
0
instead of using inheritance via visibility modes , can't we just make objects of a class in other class as data members of the class?
15th May 2018, 6:14 AM
manjul
manjul - avatar