Computer Engineering Culminating Activity
Start Here Home Page Begin Learning Final Quiz About the Webmasters Other Resources and Links

Hello, visitor.

Structured Programming

As flowcharts today become increasingly complicated and sophisticated, traditional flowcharts we use in the past become unorganized and difficult to comprehend. The essence of flowcharting is not a difficult task. However, a messy and unstructured program may be problematic. For example, it may be difficult to determine or debug a program as a whole or repetition in a complicated flowchart may cause it to stop working. Programmers realize this and had begun to utilize structured programming to assist them with their design and to achieve what they want effectively. Structured programming prevents the kind of error because modules allow programmers to pinpoint the error in the flowchart and determine the cause of a problem easily.

The theory behind structured programming is actually quite simple. It can be demonstrated with the buildings and skyscrapers we see everyday. In the olden days, houses are built simply by stacking bricks up. There is little work and design on a strong foundation because the structure of a small house is simple. This is fine, like simple flowcharts. As long as things are kept simple, a basic put-together will do the job. However, as humans began to want more they realized a strong foundation is the key to building gigantic structures and the designs of what they desire. Structured Programming is the foundation of flowcharting that make things happen.

 Structured Programming uses a variety of different building blocks of program known as modules. These modules are very useful because they are combinations of flowchart boxes designed to perform a certain task. In structured programming, there are four basic types of modules. These include SEQUENCE, DECISION, LOOP, and SELECTION.

 

SEQUENCE structure is simply a module/ building block composed of processes of a flowchart. It works by performing a sequence of task one after another. This can be very useful when a program is required to do a task over and over again in different areas. Sequences do not contain any decision boxes. However, it can keep things simple for a processor in completing a seemingly complicated combination of tasks. Sequence allows tasks to be completed a lot more efficiently in comparison to unstructured programming.

DECISION structure module is composed of two paths to continue in a flowchart based on one of two different conditions. Decision is a key component in structured programming which organizes complicated ideas and demonstrates the full capability of programming with flowcharts through interaction with users.

LOOP structure is a module which demonstrates repetition of a procedure until a condition is no longer true and the process may be continued in the flowchart. There are three main types of loops including the Do While loop, the Repeat Until loop, and the For loop. These loops are similar in nature but work in different settings and conditions.

SELECTION structure is similar to a decision module. However, there are multiple conditions and a number of different paths. The path to follow is selected based on which condition is true.

Subprograms are procedures designed to use in a particular task. Subprograms are very useful because they group identical processes and group the together to form small units. Subprograms are very important in structured programming because they save time and effort in creating programs. With subprograms and its small divided units, each unit may be worked on individually and later put together again or “sewn” to create a full structured program. Subprograms are contained in a Predefined Process Block: which can later be referenced when running the main program.

 


Previous Page

 

 

 

 

 

 

 

© 2009 Tony Xing & Justin Lau.
Canada Wide 2009 Virtual Science Fair
Click to Go Home.