OCP

SOLID Principles - Open-Closed Principle

The second of the SOLID Principles to cover is the letter O which is the Open-Closed Principle (OCP). What is the Open-Closed Principle (OCP)? The Open-Closed Principle (OCP) states that “You should be able to extend a classes behavior, without modifying".