Slide 3
Slide 3 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 3
jgs
Inheritance
§ Instead of repeating similar data/method definitions in several classes, we
can define one class with the common instance data/methods, and let other
classes inherit (extend) these data/method definitions.
§ Java: parent (super) class and child (sub) class
§ C++: base class and derived class
§ New class inherits existing members (variables and functions),
add members, and
redefine members