) Superclasses and Subclasses
) Keywords: super
) Overriding methods
) The Object Class
) Modifiers: protected, final and
abstract
) Polymorphism and Object Casting
) Interfaces
) Inner Classes
) Program Development and Class Design
, Chapter 6 Class Inheritance
) Objective: derive a new class from existing class
) Recognize the path of inheritance of classes in JDK
) Inherence model is the "is-a-relationship", not a
"has-relationship"
) WelcomeApplet is an inherited class from Applet
) All of the classes you use or define are implicitly
inherited from the top class, Object
, Superclasses and Subclasses
Superclass Circle Circle Methods Circle Data
Inheritance
Cylinder Circle Methods Circle Data
Subclass
Cylinder Methods Cylinder Data
, Superclass Subclass
Class name Circle Cylinder
data -radius -radius
-length
+getRadius
method +setRadius() +getRadius
+findArea() +setRadius()
+findArea()
inherit +getLength()
+setLength()
+findVolume()
UML Diagram