Highlighted text? Practice this concept. Highlighted passages and figures open related questions.
Practice related questions (2)Progress & bookmarks
Current section
2-1-2 Three Basic Structures
p. 417
Practice this section 2 linked exam questions with default filters
Progress
Not marked complete
Related questions in this lesson 5
Structured programming with three basic structures1Pre-test and post-test iteration3Terminating conditions in iteration flowcharts1p. 417 · PDF 427
2-1-2 Three Basic Structures
(1) Sequence
“Sequence” is a structure that runs the process in sequence from top to bottom. It is the most basic structure, and other structure units are also combined in “Sequence”.

Original source text
Figure 7-14 Sequence
Source visual description
The original sequence drawing places Process 1, Process 2 and Process 3 in execution order along a downward arrow.
(2) Selection (Decision)
“Selection (Decision)” is a structure that branches the process according to conditions. There is “two-way selection (IF-THEN-ELSE selection)” which branches the process into two according to conditions, and there is “multiple selection (CASE selection)” which branches the process into multiple (usually three or more) paths. (Generally, “Selection” mostly means “IF-THEN-ELSE selection”.) “Two-way selection” executes one of the processes depending on whether the condition is true or false. On the other hand, “CASE selection” executes the process that corresponds to the condition that holds true among multiple conditions. However, in both cases, processes are not simultaneously executed in parallel.
p. 418 · PDF 428

Original source text
Figure 7-15 IF-THEN-ELSE selection
Figure 7-16 CASE selection
Source visual description
The original IF-THEN-ELSE flowchart branches from a condition into Process 1 or Process 2 and then rejoins. The original CASE selection flowchart shows three condition branches and three corresponding processes.
(3) Iteration (Loop)

Original source text
Figure 7-17 DO-WHILE iteration
Figure 7-18 REPEAT-UNTIL iteration
Source visual description
The original DO-WHILE chart places the continuing-condition test before Process 1 and Process 2. The original REPEAT-UNTIL chart places its terminating-condition test after Process 1 and Process 2.
In loop limit symbol, the terminating condition is basically used as the condition of “iteration”. Moreover, other than the terminating condition, changes in the value of a variable can be described in the form “Variable name: Initial value, Increment, Final value”.
p. 419 · PDF 429

Original source text
Figure 7-19 Iteration by using loop limit symbol
Source visual description
The original side-by-side charts show iteration with an explicit condition and with loop-limit symbols, connected by the Same meaning label.
Three basic structures can be used in any combination. (“Iteration” can be put into the “Selection” process, and “Selection” or “Iteration” can be put into the “Iteration” process.) However, it is better to avoid the nested structure as much as possible where there is “Selection” in the “Selection” process.
Section progress
Original chapter exercises
Original chapter exercises →New FE Textbook Vol.1 · IT Fundamentals · First Edition, April 2015