Inheritance
摘要
Inheritance is a programming language mechanism that allows us to create objects from definitions provided in multiple, inter-related classes. It is a powerful feature that offers a natural solution to many design problems related to code reuse and extensibility. At the same time, it is a complex mechanism that can all too easily be misused. This chapter provides a review of inheritance and presents the major design rules and patterns involving it.