This module examines the fundamental concepts of structured programming. After completing the module you will have the skills and knowledge necessary to:
- Describe structured programming
- Identify disadvantages of unstructured programs
- Describe and use pseudocode
- Describe the three control flow constructs of structured programming
- Identify advantages of using subprograms
To begin this module, we will define what structured programming is.
Structured programming is a subset of procedural programming
that enforces a logical structure on the program being written to make it more efficient and easier to understand and modify.
Certain languages such as Ada, Pascal, and Fortran 90 are designed with features that encourage or enforce a logical program structure
frequently employs a top-down design model, in which developers map out the overall program structure into separate subsections.
A defined function is coded in a separate module or subroutine, allowing the code to be loaded into memory more efficiently.
After a module has been tested individually, it is then integrated with other modules into the overall program flow.
Program flow follows a simple hierarchical model that employs looping constructs such as
- while and
- use of the Go To statement
allows any computer program to be written with just three structures:
- sequences, and
Edsger Dijkstra's article, Go To Statement Considered Harmful
was significant in the trend towards structured programming
In the methodology employed by Dijkstra, the developer separates programs into subsections that each have only one point of access and one point of exit.