Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (80.56 KB, 7 trang )
<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1>
Session 7 - Inheritance 2/28
• <b>Derived Classes</b>
– Terminology
– Derivation
– Protected Access
• <b>Derived Functions</b>
• An inheritance is a relationship where
objects share a common structure: the
Session 7 - Inheritance 4/28
• 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.
• The derived class inherits the structure of
a base class.
• For example, a mammal inherits the
Session 7 - Inheritance 27/28
• <b>Derived Classes</b>
– Terminology
– Derivation
– Protected Access
• <b><sub>Derived Functions</sub></b>
– Shadowing
– Constructors
– Destructors