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.
Accumulator
A variable that you use to gather or accumulate values.
Summary Report
List only totals, without individual detail records.
Defensive Programming
A technique with which you try to prepare for all possible error before they occur.
Validate Data
Ensuring data items are meaningful and useful. Examples include ensuring that the values are correct data type or that they fall within an acceptable range.
GIGO
(Garbage in, Garbage Out) means that if your input is incorrect, you output is worthless.
Forcing
A data item means you override incorrect data by setting it to specific value.