Using Functions/Methods Flashcards
A program module that contains a series of statements that carry out a task; you can invoke or call this
Method
The calling programs or method is the called method’s _________
client
Each module can be called an ___________ number of time
unlimited
Sometimes also called the method declaration; this contains identifying information about the method
method header
This contains the method’s implemantation
method body
The statements that carry out the method’s tasks
Implementation
Returns control to the calling method after a method executes; a method should only have one of these
method return statement
A data item declared within a method is _____ to that method
local
when a data item is known to all of a program’s methods or modules
global data item
Methods can have ___________ which provide details about data passed into methods
parameter lists
Consists of a series of steps or procedures that take place one after the other; possible to write as one long series of steps
procedural program
breaking programs into reasonable units called modules, subroutines, functions, or methods
modularization
You can call the same _____ from multiple locations within a program
module
- Available to every module in the program
- Every module has access to the variable, can use its value, and can change its value
Global variable
- Name and value are known only to its own module
- Declared within a module
- Ceases to exist when the module ends
Local variable