Open Closed Principle

Views Updated: Dec 15, 2025

Key Facts

Abbreviation
OCP
Pronunciation
/ˈoʊpən kloʊzd ˈprɪnsəpəl/
Category
Miscellaneous
Related Field
Unclassified

Examples in Context

  1. So, did this solution conform to the Open Closed Principle(OCP)?
  2. I 'd like to start with a discussion of the Open Closed Principle(OCP) and other related ideas popularized by Robert C.Martin in his book, Agile Software Development, Principles, Patterns, and Practices.
  3. 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(OCP).
  4. To paraphrase, the Open Closed Principle(OCP) is stated as : software entities should be open for extension but closed for modification.
  5. You may not always manage to write code that satisfies the Open Closed Principle(OCP) in every aspect, but even moving partway there can be beneficial.

Other meanings of OCP