A.Open Close Principle (OCP)
Summary
Classes should be closed for modification and open for extension.
It recommend to program to interface (or abstract abstract version).
It is actually origin of SRP
It recommend introvert class design that means all the the member of classes will modify itself only.
Open Closed Principle is only realized by polymorphism if a class only depends on the public contract of the other classes it interacts with.
If a class that uses an abstraction has to downcast to a specific subclass in one section, you're not following the Open Closed Principle.
Overview Tutorial
Applicability
When defining new class apply this principle as early as possible
Change analysis is key to find problems.
Example
Related Principle
SRP
LSP
Related Patterns
Further Discussion
SRP Vs OCP: SRP leads OCP compliance. It is an specialized case of OCP or else you can say it is first step to achieve OCP.
OCP Vs LSP: LSP compliance make you closure to achieve OCP
OCP vs LSP vs SRP: OCP=>>LSP+SRP
Further References