Inheritance
This lesson discusses inheritance in detail as well as constructors in derived and base classes
We'll cover the following...
What is Inheritance
-
Provides a way to create a new class from an existing class.
-
New class is a specialized version of the existing class.
-
Allows the new class to overload methods from the existing class.
Terminology
- Base Class(or Parent): inherited by child class.
- Derived Class(or child): inherits from base class.
Characteristics
A derived class has:
- All members defined in the derived class.
- All members declared in the base class.
A derived class can:
- Use all
public
Access this course and 1400+ top-rated courses and projects.