@efpage you see, derived classes is not about SRP.
The inheritance is one of the ways to follow OCP (Open/Close Principle) and DIP (Dependency Inversion Principle). And more than -- it is not a best way to respect these principles.
Inheritance is a mechanism of sub-typing, limitted by LSP (Liskov Substitution Principle) that makes SRP not relevant to inheritance: Derived Class MUST DO the same stuff as a Base Class, but in differnet way, preserving safity of substitution.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
@efpage you see, derived classes is not about SRP.
The inheritance is one of the ways to follow OCP (Open/Close Principle) and DIP (Dependency Inversion Principle). And more than -- it is not a best way to respect these principles.
Inheritance is a mechanism of sub-typing, limitted by LSP (Liskov Substitution Principle) that makes SRP not relevant to inheritance: Derived Class MUST DO the same stuff as a Base Class, but in differnet way, preserving safity of substitution.