Chapter 5. DESIGNING STRUCTURED PROGRAMS

CHAPTER OBJECTIVES

Upon completion of this chapter, you should be able to

  • Explain what is meant by structured programming.

  • Identify hierarchy charts and explain their purpose in top-down programming.

  • Explain how flowcharts, pseudocode, and hierarchy charts are used as program design tools.

  • Identify the four logical control structures used in structured programming.

WRITING WELL-DESIGNED PROGRAMS

In the early days of programming, students learning to program believed that mastering the rules of a programming language was all that was needed to write well-designed programs. Often, instruction formats and coding rules necessary for writing programs were taught without ever fully explaining the way programs are actually designed. It is, of course, true that you must learn programming rules, or syntax, before instructions can be written. Unfortunately, however, knowledge of a programming language's rules will not guarantee that programs will be designed properly. That is, it is possible for a program to be written correctly without any syntax errors, and yet the entire set of procedures might be poorly designed so that they do not work properly or efficiently. In addition to learning syntax, then, software developers must learn how to design a program so that it functions effectively as an integrated whole. We define the term program design to mean the development of a program so that its elements fit together logically and effectively in an integrated ...

Get PROGRAMMING IN COBOL/400: 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.