上QQ阅读APP看书,第一时间看更新
Principles of design patterns
So far, we have discussed taking a multi-class approach to designing object-oriented programs. We also used examples to demonstrate the use of accessors, mutators, constructors, and driver classes. There are three key principles to bear in mind when studying the design patterns presented in subsequent chapters of this book:
- Creating concise objects
- Encapsulating to protect
- Being purposeful with inheritance
These principles are explored in the subsequent sections.