• 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