Inheritance and Overriding
- Created by: JoshThompson1
- Created on: 30-11-21 17:03
Fullscreen
Inheritance and Overriding
Specification
Be familiar with the concepts of:
- inheritance
- overriding
Inheritance
A class can inherit another class. Inheritance allows one class to share the properties and methods of another class, while having its own properties and methods too.
Inheritance can be described as an "is a" relationship: a DeLorean is a car.
The example above shows the class definition for DeLorean. The brackets…
Comments
No comments have yet been made