
Students' Guide to
Program
Design
4.1 The selection control structure
The selection control structure was introduced in Chapter 2, as the
second construct in the Structure Theorem. This structure represents
the decision making abilities of the computer. That is, a programmer
would use the selection control structure in pseudocode to illustrate a
choice between two or more actions, depending on whether a certain
condition is true or false. There are a number of variations of the
selection structure, and these will be considered in detail.
1 Simple selection (Simple IF statement)
Simple selection occurs when
a
choice is made between two alternativ ...