Software entities (classes, modules, functions, etc.) should be open for extension but
closed for modification.
Patterns: Strategy
Liskov Substitution Principle (LSP)
Subtypes must be substitutable for their base types
Interface Segregation Principle (ISP)
This principle deals with the disadvantages of "fat" interfaces. Classes whose interfaces are not
cohesive have "fat" interfaces. In other words, the interfaces of the class can be broken up into
groups of methods. Each group serves a different set of clients. Thus, some clients use one group of
methods, and other clients use the other groups.
Dependency-Inversion Principle (DIP)
High-level modules should not depend on low-level modules. Both should depend
on abstractions.
Abstractions should not depend upon details. Details should depend upon
abstractions.
Reference
Martin, Robert C., and Micah Martin. Agile principles, patterns, and practices in C. Upper Saddle River, NJ: Prentice Hall, 2007. Print.
Single-Responsibility Principle (SRP)
Martin, Robert C., and Micah Martin. Agile principles, patterns, and practices in C. Upper Saddle River, NJ: Prentice Hall, 2007. Print.