Chapter 9 - Inheritance and Interfaces Flashcards

1
Q

The is-a relationship between a more general superclass and a more specialized subclass.

A

inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A general class from which a more specialized class (a subclass) inherits.

A

superclass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A class that inherits variables and methods from a superclass but adds instance variables, adds methods, or redefines methods.

A

subclass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The principle that a subclass object can be used in place of any superclass object.

A

substitution principle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Redefining a method in a subclass.

A

override

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Giving more than one meaning to a method name.

A

overloaded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

dynamic method lookup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Selecting a method among several methods that have the same name on the basis of the actual types of the implicit parameters.

A

polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A method with a name, parameter variable types, and return type but without an implementation.

A

abstract method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A class that cannot be instantiated.

A

abstract class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A class that can be instantiated.

A

concrete class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A value that is computed by a hash function.

A

hash code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A type with no instance variables, only abstract methods and constants.

A

interface type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Implementing an interface Implementing a class that defines all methods specified in the interface.

A

implements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A value that cannot be changed by a program. In Java, constants are defined with the reserved word final.

A

constants

How well did you know this?
1
Not at all
2
3
4
5
Perfectly