Answers
- It stands for the Open-Closed Principle. Its purpose is to ensure a software component or module is closed for modification but open for extension.
- The DIP prescribes that clients should always depend on abstractions rather than concretions. By doing that, we protect clients from changes in the concretions that may require changes in the client code.
- The abstract factory pattern provides objects based on their supertype, which can be used in LSP, where supertypes are replaced with subtypes while retaining the object’s behavior consistency.