Chapter 3 Flashcards
(43 cards)
method
a program module that contains a series of statements that carry out a task
Invoke/call a method
execute it
client method
a method that calls another
Abstraction
The programming feature that allows you to use a method name to encapsulate a series of statements
Method header
The first line of the method and contains information about how other methods can interact with it
Declaration
Another name for a method header
method body
Set of statements between curly braces that follow the header and that carry out the method’s actions
Implementation
describes the actions that execute within a method, method body
Stub
A method that contains no statements, programmers create stubs as temporary placeholders during the program development process
Access modifier (another term)
Access spesifier
return type
Indicates the type of data that is send back to its calling method ofter completion of the method
To return a call
is to send a call from a called method back to the calling method
A fully qualified identifier
Includes a class name and a dot before the identifier
Arguments
Are data items sent to methods in a method call
Parameters
Data items received by a method
Implementation hiding
Is a principle of object-oriented programming that describes the encapsulation of method details within a class
Interface to a method
includes the methods return type, name, arguments. Is the part that the client sees and uses
A black box
Device that you can use without understanding how it works
Local variable
Known only within the boundaries of a method
A methods signature
The combination of the method name and number, types and order of arguements
Actual parameters
Arguments in a method call
Formal parameters
The variables in a method declaration that accept the values from actual parameters
Return statement
ends a method and frequently sends a value from a called method back to the calling method
Method type
Its return type