Using Functions/Methods Flashcards

1
Q

A program module that contains a series of statements that carry out a task; you can invoke or call this

A

Method

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

The calling programs or method is the called method’s _________

A

client

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

Each module can be called an ___________ number of time

A

unlimited

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

Sometimes also called the method declaration; this contains identifying information about the method

A

method header

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

This contains the method’s implemantation

A

method body

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

The statements that carry out the method’s tasks

A

Implementation

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

Returns control to the calling method after a method executes; a method should only have one of these

A

method return statement

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

A data item declared within a method is _____ to that method

A

local

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

when a data item is known to all of a program’s methods or modules

A

global data item

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

Methods can have ___________ which provide details about data passed into methods

A

parameter lists

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

Consists of a series of steps or procedures that take place one after the other; possible to write as one long series of steps

A

procedural program

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

breaking programs into reasonable units called modules, subroutines, functions, or methods

A

modularization

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

You can call the same _____ from multiple locations within a program

A

module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Available to every module in the program
  2. Every module has access to the variable, can use its value, and can change its value
A

Global variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. Name and value are known only to its own module
  2. Declared within a module
  3. Ceases to exist when the module ends
A

Local variable

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

_____ means existing and usable until it dies and becomes out of scope

A

in scope

17
Q

Known as information hiding or data hiding

A

encapsulation

18
Q
  1. Header
  2. Body
  3. Return statement
A

Method must include:

19
Q

Communications received by a method

A

Parameter

20
Q

Value in parentheses when calling a method

A

Argument

21
Q

Encapsulation of method details

A

Implementation hiding

22
Q
  1. Type of the parameter
  2. Local name for the parameter
A

Method declaration must include:

23
Q

variables passed to the method are passed by _______

A

value

24
Q

List of elements

A

array

25
Q

______ array passed by value

A

Single

26
Q

____ array passed by reference

A

Entire

27
Q

Supplying diverse meanings for a single identifier

A

Overloading

28
Q

write multiple methods with same name, different parameter lists

A

Overload a method