Question OOP-SOLID-0048
MediumWhich statement best describes the Liskov Substitution Principle?
- A.
Subclasses must not add new methods
- B.
Every class must have one method
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
SOLID and Design Principles question
Which statement best describes the Liskov Substitution Principle?
Subclasses must not add new methods
Every class must have one method
Sign up free to see the answer and a step-by-step explanation.
Interfaces must be small
Objects of a subclass should be replaceable for objects of the parent without breaking correct behaviour