Chapter 5. Designing and Debugging Batch and Interactive COBOL Programs
To familiarize you with
The way structured programs should be designed.
Pseudocode and flowcharts as planning tools used to map out the logic in a structured program.
Hierarchy or structure charts as planning tools used to illustrate the relationships among modules in a top-down program.
The logical control structures of sequence, selection, iteration, and case.
Techniques used to make programs easier to code, debug, maintain, and modify.
WHAT MAKES A WELL-DESIGNED PROGRAM?
Many programming texts teach the instruction formats and coding rules necessary for writing programs without ever fully explaining the way programs should be designed. In fact, in Chapters 1 through 4 we illustrated the actual planning tools used to specify the logic in a program. In this chapter, we focus on the full range of program design tools that can be used in all programs.
We use the term program design to mean the development of a program so that its elements fit together logically and in an integrated way. In Chapters 1 through 4, we discussed several program design techniques.
Program Logic Should Be Mapped Out Using a Planning Tool
If programs are systematically planned before they are coded, they will be better designed. Planning tools such as pseudocode and hierarchy charts help programmers map out program logic. Just as architects prepare blueprints before buildings are constructed, so, too, should programmers ...