Chapter 5 Flashcards
Loop Control Variable
A variable that determines weather a loop will continue
Definite Loop
Which the number of repetitions is predetermined value.
Counted or Counter-Contolled Loop
A loop whose repetitions are managed by a counter.
Increment
A variable is to add a constant value to it, frequently 1.
Decrement
A variable is to decrease it by a constant value, frequently 1.
Counter
Any numeric variable you use to count the number of times an event has occurred.
Indefinite Loop
One for which you cannot predetermine the number of executions.
Nested Loop
Occur when a loop structure exist within another loop structure.
Outer Loop
This loop contains another loop when nested.
Inner Loop
This loop is contained by another loop when nested.
Stub
A method without statements that is used as a placeholder.
For Statement/For Loop
Can be used to code definite loops. It contains a loop control variable that it automatically initializes, evaluates, and alters.
Step Value
A number you use to increase a loop control variable on each pass through a loop.
Pretest Loop
Tests a loop control variable before each iteration, meaning that the loop body might never execute.
Posttest Loop
Tests a loop control variable after each iteration, meaning that the loop body executes once.