Module 8 Cosc 205 Inheritance N Poly
Module 8 Cosc 205 Inheritance N Poly
OBJECT ORIENTED
PROGRAMMING:
Inheritance
Adekola Olubukola, PhD, FNCS
Tel: +234803 374 6984
[email protected]
Module 8: Inheritance
GENERAL OBJECTIVE:
INHERITANCE
This introduces one of the primary capabilities of Object-Oriented
Programming Paradigm based on organizing classes into a hierarchical
structure described as the concept of Inheritance. It is a form of software
reuse in which a new class is created by absorbing (inheriting from) an
existing class’s members and embellishing them with new or modified
capabilities. This earns us time and quality advantages. The existing class is
called the superclass, and the new class is the subclass (also called derived or
child class). Each subclass can become a superclass for future subclasses. A
subclass can add its own fields and methods. Therefore, a subclass is more
specific than its superclass and represents a more specialized group of objects.
The subclass exhibits the behaviors of its superclass and can modify those
behaviors so that they operate appropriately for the subclass. The direct
superclass is the superclass from which the subclass explicitly inherits. An
indirect superclass is any class above the direct superclass in the class
hierarchy, which defines the inheritance relationships between classes.
INHERITANCE
CommunityMember
Faculty Staff
Administrator Teacher