Design Patterns Open - Closed Principle

Open - Closed Principle (The Open-Closeed Principle, referred to as OCP), or called open - closed principle.

Open - Closed Principle, is that software entities (classes, modules, functions, etc.) should be able to expand, but can not be modified.

 

The face of demand changes to the program is carried out by adding new code, rather than changing existing code.

Guess you like

Origin www.cnblogs.com/hssds/p/11691952.html