3: Chapter 9 Flashcards

1
Q

Code reuse

A

The practice of writing program code once and using it in many contexts.

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

Is-a relationship

A

A hierarchical connection between two categories in which one type is a specialized version of the other.

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

Inheritance hierarchy

A

A set of hierarchical relationships between classes of objects.

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

Inheritance (inherit)

A

A programming technique that allows a derived class to extend the functionality of a base class, inheriting all of its state and behavior.

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

Superclass

A

The parent class in an inheritance relationship.

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

Subclass

A

The child, or derived, class in an inheritance relationship.

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

Override

A

To implement a new version of a method to replace code that would otherwise have been inherited from a superclass.

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

Has-a relationship

A

A connection between two objects where one has a field that refers to the other. The contained object acts as part of the containing object’s state.

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

Substitutability

A

The ability of an object of a subclass to be used successfully anywhere an object of the superclass is expected.

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

Interface

A

A type that consists of a set of method declarations; when classes promise to implement an interface, you can treat those classes similarly in your code.

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

Abstract method

A

A method that is declared (as in an interface) but not implemented. Abstract methods represent the behavior that a class promises to implement when it implements an interface.

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

Object-oriented design

A

Modeling a program or system as a collection of cooperating objects, implemented as a set of classes using class hierarchies.

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

Refactoring

A

Changing a program’s internal structure without modifying its external behavior to improve simplicity, readability, maintainability, extensibility, performance, etc.

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

Abstract class

A

A Java class that cannot be instantiated, but that instead serves as a superclass to hold common code and declare abstract behavior.

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

Polymorphism

A

The ability for the same code to be used with several different types of objects and for the code to behave differently depending on the actual type of object used.

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