Vocabulary
Inheritance
superclass
subclass
extends
override
implementsAbstract (vs concrete) class
super
Polymorphism
protected access
inheritance hierarchy
interface
the Object class
Topics
super()
in the first line of constructor
super.method_name()
anywhere in a subclass method.
Shape[] shapes = new Shape[3];
shapes[0] = new Circle(2);
shapes[1] = new Rectangle(2,3);
shapes[2] = new Square(5);
for (int i=0; i < shapes.length; i++) {
System.out.println("The area for " + shapes[i] + " is " + shapes.calcArea());
}
public abstract class Shape {
public abstract double calcArea();
...
Must define method in the subclass. Can't create a Shape object; can only create a subclass.
Object
implements
keyword.
You are required to know the vocabulary but you will not be asked to write code related to this topic.
Vocabulary
Events
Event Loop
Event Queue
Listening to Events
Event listeners
Event source
Event HandlingGUI Components
Local Inner classes
Anonymous Inner classes
Components: Text Fields, Text Areas
RGB Color
Swing and AWT Libraries