More insight in designing our inheritance diagram

Hello,
I want to know how can I get more insight in designing my inheritance diagram..I mean in a project with few classes or even in bigger projects, we should have some reasons to derive a class from another class or to choose a class as a base/abstract base class (it's obvious in some cases like Cpolygon, Ctriangle and Crectangle example in tutorial). Would you please give me more knowledge in this topic ?

Thank you in advance,
Ali.
Last edited on
In c++ there is no correct way of doing things. You can of course do everything without inheritance but it can save some code. Inheritance can be used for example if you have many actions and you wanna queue them so they activate one at a time. You can make a parent class to all of them and not have to process them individually.
Topic archived. No new replies allowed.