第11章 继承与派生 11.1继承与派生的概念 11.2派生类的声明方式 11.3派生类的构成 11.4派生类成员的访问属性 11.5派生类的构造函数和析构函数 11.6 多重继承 11.7基类与派生类的转换 11.8继承与组合 11.9继承在软件开发中的重要意义 2017年4月26日星期 第11章继承与派生 H0雪2时16分23秒 BACK NEXT
HOME2017年4月26日星期 三12时16分23秒 第11章 继承与派生 2 11.1 继承与派生的概念 11.2 派生类的声明方式 11.3 派生类的构成 11.4 派生类成员的访问属性 11.5 派生类的构造函数和析构函数 11.6 多重继承 11.7 基类与派生类的转换 11.8 继承与组合 11.9 继承在软件开发中的重要意义
Inherit and derivation of class The process of constructing a new class based on specialties of an existing class is known as inherit. The process of constructing a new class by adding self-specialties based on an existing class is named as derivation. The existing class inherited by is called basic class or father class. The new class constructed by derivation is called derived class. 2017年4月26日星期 第11章继承与派生 3 H0画2时16分23秒 BACK NEXT
HOME2017年4月26日星期 三12时16分23秒 第11章 继承与派生 3 • The process of constructing a new class based on specialties of an existing class is known as inherit. • The process of constructing a new class by adding self-specialties based on an existing class is named as derivation. • The existing class inherited by is called basic class or father class. • The new class constructed by derivation is called derived class
Example of inherit and derivation 交通工具 汽车 小汽车 卡车 旅行车 工具车 轿车 面包车 2017年4月26日星期 第11章继承与派生 4 H0雪2时16分23秒 BACK NEXT
HOME2017年4月26日星期 三12时16分23秒 第11章 继承与派生 4 工具车 轿车 面包车 小汽车 卡车 旅行车 汽 车 交 通工具
Example of inherit and derivation 动物 猴子 猫 鸟 狮子 虎 猎豹 017年4月26日星期 第11章继承与派生 HOME 5 12时16分23秒 BACK NEXT
HOME2017年4月26日星期 三12时16分23秒 第11章 继承与派生 5 猴 子 狮子 虎 猎豹 猫 鸟 动 物
Purpose of inherit and derivation Purpose of inherit: Realizing code reused. Purpose of derivation: When a new problem appears and the original program can't resolve it,we must reconstruct the original program. 2017年4月26日星期 第11章继承与派生 6 0雪2时16分23秒 BACK NEXT
HOME2017年4月26日星期 三12时16分23秒 第11章 继承与派生 6 • Purpose of inherit: Realizing code reused. • Purpose of derivation: When a new problem appears and the original program can’t resolve it, we must reconstruct the original program