Chapter 9 - Inheritance and Interfaces Flashcards
The is-a relationship between a more general superclass and a more specialized subclass.
inheritance
A general class from which a more specialized class (a subclass) inherits.
superclass
A class that inherits variables and methods from a superclass but adds instance variables, adds methods, or redefines methods.
subclass
The principle that a subclass object can be used in place of any superclass object.
substitution principle
Redefining a method in a subclass.
override
Giving more than one meaning to a method name.
overloaded
Selecting a method to be invoked at run time. In Java, dynamic method lookup considers the class of the implicit parameter object to select the appropriate method.
dynamic method lookup
Selecting a method among several methods that have the same name on the basis of the actual types of the implicit parameters.
polymorphism
A method with a name, parameter variable types, and return type but without an implementation.
abstract method
A class that cannot be instantiated.
abstract class
A class that can be instantiated.
concrete class
A value that is computed by a hash function.
hash code
A type with no instance variables, only abstract methods and constants.
interface type
Implementing an interface Implementing a class that defines all methods specified in the interface.
implements
A value that cannot be changed by a program. In Java, constants are defined with the reserved word final.
constants