Questions
- What is the Liskov substitution principle?
A. Base class instances should be replaceable with instances of their derived type.
B. Derived class instances should be replaceable with instances of their base type.
C. Designing for generics that can work with any data type.
Answer – A
- What is the single responsibility principle?
A. Instead of one common large interface, plan for multiple scenario-specific interfaces for better decoupling and change management.
B. You should avoid taking a direct dependency on a concrete implementation; instead, you should depend on abstractions as much as possible.
C. An entity should only have a single responsibility. You should avoid giving one entity multiple responsibilities.
D. Entities should be designed in such a way that they should be open for extension but closed for modification.
Answer – C
- What is the open closed principle?
A. Open to modification, but closed...