1. Trang chủ
  2. » Luận Văn - Báo Cáo

Lập trình hướng đối tượng: Session 7 - Inheritance

7 10 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

• An inheritance is a relationship where objects share a common structure: the.. structure of one object is a sub-structure of another object..[r]

(1)

Session – Inheritance

(2)

Session - Inheritance 2/28

Objectives

Derived Classes

– Terminology – Derivation

– Protected Access

Derived Functions

(3)

Inheritance

• An inheritance is a relationship where objects share a common structure: the

(4)

Session - Inheritance 4/28

Inheritance

• In object-oriented programming, we

describe inheritance in terms of classes Inherited classes share a common

structure We say that one class is a kind of another class

(5)

Terminology(1)

• The derived class inherits the structure of a base class

• For example, a mammal inherits the

(6)

Session - Inheritance 27/28

(7)

Summary

Derived Classes – Terminology

– Derivation

– Protected Access

Derived Functions

– Shadowing – Constructors – Destructors

Ngày đăng: 10/03/2021, 14:35

Xem thêm:

w