Lesson 6

image Inheritance in Java is a concept that acquires the properties from one class to other classes. Classes can be derived from classes in Java. The derived class (the class that is derived from another class) is called a subclass. The class from which its derived is called the superclass.

Lesson 10

image In this example, the extend keywords indicates that the PainterPlus class inherits or acquires all the properties of the Painter class. All of the public void variables created in the PainterPlus.java file can be used in the main MyNeighborhood.java file because it is extended.

PainterPlus.java

image

MyNeighborhood.java

image

Lesson 14

PainterPlus.java

image PainterPlus extends everything from the Painter parent class.

PatternPainter.java

image PatternPainter extendes everyhing from the PainterPlus class so it extends from the Painter class as well.

BackgroundPainter.java

image BackgroundPainter extendes everyhing from the PatternPainter class so it extends from the and PainterPlus and Painter class as well.