Inheritance policy when designing the base class
- by Xaqron
I have a base class and a derived class both in design phase. The base class will remain one but many derived class will inherit from it. So it's very costly to make change to derived classes in the future and I'm looking for the best design to prevent this.
In fact derived class only needs a few methods to override (if needed) but it's tempting to reveal more details to it.
My question is about the policy which is extensible in future.
Can I minimize the inherited methods/properties to derived class and reveal more in the next versions if needed without any change to derived classes ?
Or I should reveal anything that maybe used by derived classes in the future and let them to choose if they need them or not ?
Thanks