According to the Liskov Substitution Principle (LSP), objects of a superclass should be replaceable with objects of its subclasses without:
AIncreasing execution time
BChanging database schemas
CAltering the correctness of the program
DModifying compiler settings
Explanation
LSP (the ‘L’ in SOLID) requires that subclass instances fulfill all contracts of the superclass without introducing unexpected errors.
Exam Relevance
- Topic: Software Architecture
- Subtopic: SOLID Principles

No Comments