Liskov Substitution Principle (EN)
ConceptPrinciple stating that objects of a base class can be replaced by objects of derived classes
Architecture
classDiagram class BaseClass { +methodA() +methodB() } class DerivedClass1 { +methodA() +methodB() +methodC() } class DerivedClass2 { +methodA() +methodB() } BaseClass <|-- DerivedClass1 BaseClass <|-- DerivedClass2 In Context
- Typically used together with Open/Closed Principle and Interface Segregation Principle
- Related to: SOLID principles, Design by Contract
- Example use: Creation of extensible frameworks where base classes can be replaced by specialized implementations