Chapter 3 Flashcards
Spaghetti code
snarled unstructured program logic.
Unstructured programs
are programs that do not follow the rules of structured logic.
Structured programs
are programs that do follow the rules of structured logic.A structure
structure
is a basic unit of programming logic; each structure is a sequence, selection, or loop.
sequence structure
contains series of steps executed in order. A sequence can contain any number of tasks, but there is no option to branch off, skipping any of the tasks.
selection structure or decision structure
contains a conditional test, and, depending on the result, takes one of two courses of action before continuing with the next task.
Boolean expression
is one that represents only one of two states, usually expressed as true or false.
end-structure statement
designates the end of a pseudocode structure.
if-then-else
is another name for a dual-alternative selection structure.
Dual-alternative ifs (or dual-alternative selections)
define one action to be taken when the tested condition is true and another action to be taken when it is false.
Single-alternative ifs (or single-alternative selections
take action on just one branch of the decision.
null case or null branch
is the branch of a decision in which no action is taken
null case or null branch
is the branch of a decision in which no action is taken
loop structure
continues to repeat actions while a test condition remains true.
loop body
is the set of actions that occur within a loop.