Chapter 5 Flashcards
Function
A group of statements withing a program that perform as specific task.
What is a nickname for a function?
Divide and conquer
Modularized Program
A program wherein each task within the program is in its own function.
What are the benefits of using a function?
Simpler code, code reuse, better testing and debugging, faster development, easier facilitation of teamwork.
Void Function
Simply executes the statements it contains and then terminates.
Value-returning Function
Executes the statements it contains, and then it returns a value back to the statements that called it.
How are functions named?
They have the same rules as variables.
Function Definition
Specifies what the function does.
Function Header
First line of function
Block
Set of statements that belong together as a group.
Main Function
A function that is called when the program starts. (Has all the other functions/code in it)
Top-Down Design
Technique for breaking algorithm into functions.
Hierarchy Chart
Depicts relationship between functions.
Local Variable
Variable that is assigned a value inside a function.
Scope
The part of a program in which a variable may be accessed.