Object-Oriented Design Principles
Introduction When I first learned the object-oriented programming (OOP), I was offered simple examples such as a Dog is an Animal and so does a Cat, or a Car has an Engine and four Wheelss, where the former is an is-a relationship indicating inheritance and the latter is a has-a relationship indicating composition. Although these are perfect examples for teaching OOP concepts, they are far from the principles of designing good OO system. The most important criterion of a good OO design is the flexibility: how troublesome, for example, the number of class files we need to touch, if we want to make a certain change. Object-oriented design principles are several guidelines to help us make our software flexible. In this blog, I would like to introduce several design principles I learned from this book.