A simple technique to motivate structured programming

Terry Flaherty · 1988

Programs with only sequence, selection, and iteration control structures (structured programs) are more understandable and changeable than programs with unrestricted control structures (flowchart programs).However, flowcharts are intuitive, simple, and easy to follow step by step.The transition from teaching general flowcharts to structured ones is usually made by postulating the standard structured flowchart patterns without much justitication.The present method establishes the correspondence between flowcharts and structured programs via sets of computations.The student examines a set of computations of a flowchart program and describes the general structure with a regular expression.A structured program that corresponds to this regular expression is constructed.In this way, the student is led to (1) see the difference between program and compumion, (2) see how "structure" arises, (3) see that a structured program is one whose textual structure is identical to the structural description of its computations, (4) appreciate the cognitive simplicity of structure descriptions versus flowcharts.

Read the paper · More papers on PaperTik