This content has been marked as final. Show 1 reply
Welcome to the forum!
The question that comes to my mind is:
How will featur2 work with class D which seams not to have the non public methods of classes A - C?
I'd suggest that you closely look at your existing classes if you can split them into smaller ones. Especially I'd try to extract Featur1 so that it has the same interface as Feature2. Than I'd compose the features with the smaller pieces.
This way your instances of Root could just hold a collection of features and simply iterate over it to invoke the features. Root would not need subclasses because of the features (but maybe for other reasons...).