Questions
- What is the LSP?
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.
- What is the SRP?
a. Instead of having one common large interface, plan for multiple scenario-specific interfaces for better decoupling and change management.
b. You should avoid having direct dependencies 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.
- What is the OCP?
a. Entities should be open to modification but closed for extension.
b. Entities should be open to extension but closed for modification.
c. Entities should be open to composition but closed for extension.
d. Entities should be open to abstraction but closed for inheritance.
- Which pattern is used to make two incompatible interfaces work together?
a. Proxy
b. Bridge
c. Iterator
d. Adapter
- Which principle ensures that services can be deployed and scaled independently and that an issue in one service will have a local impact and can be fixed by just redeploying the impacted service?
a. The domain-driven design principle
b. The Single Responsibility Principle
c. The stateless service principle
d. The resiliency principle