Today's lecture was on Chapter 9, Inheritance. It was an example of a test question.
There are four files for this lecture.
- The Main, this file creates objects of the classes.
- The Mammal class is the super class.
- The Bear class inherits from the Mammal class, and
- The Whale class inherits from the Mammal Class.
- Some of the topics covered in the code were creating a method final.
- Private, public, and protected methods and variables
- Overwriting a method from the base class
- super
- and other general rules of inheritance. It also includes a review of a static variable.
|