Liskov Substitution Principle
← Back to SOLID Principles
Subtypes must be substitutable for their base types. If a program uses a base class, it should be able to use any subclass without knowing the difference and without breaking correctness.
Key Properties
Related
- Inheritance (LSP governs proper use)
- Polymorphism (depends on LSP for correctness)