Intermediate
Object-Oriented Programming Concepts
Q46 / 100
What is the purpose of the "Liskov Substitution Principle" (the L in SOLID)?
Correct! Well done.
Incorrect.
The correct answer is A) Subclasses should be replaceable for their base classes without altering correct program behavior
A
Correct Answer
Subclasses should be replaceable for their base classes without altering correct program behavior
Explanation
LSP states that code using a base class reference should work correctly even when given an instance of any subclass, preserving expected behavior and invariants.
Progress
46/100