AP CSP Unit 7 Vocab Flashcards
Parameter
a variable in a function definition. Used as a placeholder for values that will be passed through the function.
Argument
the value saved to the parameter in the function
Return
used to return the flow of control to the point where the procedure (also known as a function) was called and to return the value of expression.
procedural abstraction
Extracting shared features to generalize functionality
Using parameters allows the functions (also called procedures) to be generalized.
Using procedural abstraction helps improve code readability.
Procedural abstraction manages complexity by allowing for code reuse.
For example: the function move(id, direction) could be used to move an element in any direction, rather than writing separate functions for each direction.
Library
a group of functions (procedures) that may be used in creating new programs
API
Application Program Interface - specifications for how functions in a library behave and can be used
Modularity
the subdivision of a computer program into separate subprograms