Week 2 Code.org 6-15
Code.org Key Learning from Week2
Lesson 6
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
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
MyNeighborhood.java
Lesson 14
PainterPlus.java
PainterPlus extends everything from the Painter parent class.
PatternPainter.java
PatternPainter extendes everyhing from the PainterPlus class so it extends from the Painter class as well.
BackgroundPainter.java
BackgroundPainter extendes everyhing from the PatternPainter class so it extends from the and PainterPlus and Painter class as well.