Open/closed principle

One last principle that we can quickly discuss is the open/closed principle. It states that you should write your code and functionality so as to limit the number of changes necessary to add new functionality. Your OO designs should be open for extension but closed for modifications. Note that this principle is not only applicable to classes.