go to previous page   go to home page   go to next page

Answer:

Yes


Structure Rule Five: Nesting Structures

In flowcharting terms, any code block can be replaced by any of the three structures sequence, alternation, or iteration. Or, going the other direction, if there is a portion of the flowchart that has a single entry point and a single exit point, it can be summarized as a single code block.

Rule 5 of Structured Programming: A structure (of any size) that has a single entry point and a single exit point is equivalent to a code block.

For example, say that you are designing a program to go through a list of signed integers calculating the absolute value of each one. You might (1) first regard the program as one block, then (2) sketch in the iteration required, and finally (3) put in the details of the loop body.

zooming in on a code block

Or, you might go the other way. Once the absolute value code is working, you can regard it as a single code block to be used as a component of a larger program.


QUESTION 14:

(Thought question:) How many boxes can a structured flowchart have?