Page 199 - AP Computer Science A, 7th edition
P. 199

CHAPTER 3
Inheritance and Polymorphism
Say not you know another entirely, till you have divided an inheritance with him. —Johann Kaspar Lavatar, Aphorisms on Man
    Chapter G oals
• Superclasses and subclasses • Inheritance hierarchy
• Polymorphism
• Type compatibility
• Abstract classes • Interfaces
  INHERITANCE Superclass and Subclass
Inheritance defines a relationship between objects that share characteristics. Specifically it is the mechanism whereby a new class, called a subclass, is created from an existing class, called a
 
























































































   197   198   199   200   201