Chapter 6 Flashcards

1
Q

actual parameter/argument

A

The variable or data to substitute formal parameters when invoking a method.

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

ambiguous invocation

A

There are two or more possible methods to match an invocation of a method, and neither is more specific than the other(s). Therefore, the invocation is ambiguous.

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

divide and conquer/stepwise refinement

A

The concept of method abstraction can be applied to the process of developing programs. When writing a large program, you can use the “divide and conquer” strategy to decompose it into subproblems. The subproblems can be further decomposed into smaller, more manageable problems.

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

formal parameter (i.e., parameter)

A

The variables defined in the method signature.

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

information hiding

A

A software engineering concept for hiding the detail implementation of a method for the client.

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

method

A

A collection of statements grouped together to perform an operation. See class method, instance method.

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

method abstraction

A

A technique in software development that hides detailed implementation. Method abstraction is defined as separating the use of a method from its implementation. The client can use a method without knowing how it is implemented. If you decide to change the implementation, the client program will not be affected.

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

method overloading

A

Method overloading means that you can define methods with the same name in a class as long as there is enough difference in their parameter profiles.

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

method signature

A

The combination of the name of a method and the list of its parameters.

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

modifier

A

A Java keyword that specifies the properties of data, methods, and classes and how they can be used. Examples of modifiers are public, private, and static.

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

parameter

A

A variable that is defined in the method header.

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

pass-by-value/call-by-value

A

A term used when a copy of the value of the argument is passed to the method. For a parameter of a primitive type, the actual value is passed; for a parameter of a reference type, the reference for the object is passed.

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

scope of a variable

A

Is the part of the program where the variable can be referenced.

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

stub

A

A simple, but not complete, version of the method. The use of stubs enables you to test invoking the method from a caller.

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

Main method

A

Is the starting method for executing a program.

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