What is the best way to have some function in a tree or inherate class.
Here is what I have :
And I want all to have ClassD but I do not want to include ClassD in all Class.Code:ClassA (who have the main) --
|___ClassB (object 1) |----ClassD
|____ClassC (object 2) --
