The Open-Closed Principle (OCP) is one of the fundamental rules of object-oriented design that a software developer should always keep in mind. When reviewing code, I like to find the OCP violations by looking at switch statements. It seems to be the easiest way to violate the OCP in switch statements, as well as to find these violations..
[More]