Implementing Sequence Structures

 

Of all of the control structures, we are most familiar with sequenced structures. We have been using sequence in the examples covered in earlier lessons. A sequence structure represents a process step. An important part of system theory is that there is one input to the process and one output. All control structures, including sequence, represent the processing step in systems theory. The systems theory rule of one input moving into a process and finally to one output returned is central to the correct use of control structures.

 

Flowcharts Example of Sequence Structures

 

The sequence structure is drawn on a flowchart with two arrows and a rectangle. One arrow points to the top of the rectangle and represents the entry point (input). The rectangle represents the process and within it a short text message should explain what that step will do. A final line will drop from the bottom of the rectangle and represent the exit point (output). In (Figure 5) a single sequence structure. Please note that the example structure is a template and is unlabeled whereas typically it would contain information on what this sequence structure would perform.

 

 

Figure 5: A Sequence Structure demonstrated in an actual application. The sequence structure includes an assignment where the msg variable will hold the literal "Hello World."

 

Common Sequence Structure Flowcharting Mistakes

 

Sequence structures are the easiest of the control structures to flowchart. Mistakes made on sequence structures usually have to do with forgetting to add both an input and output line to the top and bottom of the sequence structure rectangle symbol. A sequence symbol that only outputs or only inputs data is incorrect.

 

 

Figure 6: Example of valid and invalid sequence flow chart

 

Rules of Flowcharting Continued

 

Flowcharts are designed to provide a flexible graphical alternative to pseudo code for representing computer logic. With pseudo code, we have rules regarding the construction of pseudo code statements and recommendations concerning the formatting of pseudo code (i.e. certain statements should be indented to add clarity to the logic). Flowcharts also have rules that should be observed when using drawing structures. Flowcharting rules are a combination of requirements necessary to implement structures correctly and also to make the chart easier to read.

 

Below I have listed some of the important rules you will want to take in consideration when designing flowcharts. As with so many topics covered in this lesson, we cover only the fundamentals of flow charting. To complete your understanding of flowcharts would require some additional study and more practice that is asked for than with this lesson. One of the more popular software tools used to create flowcharts is Microsoft's Visio software.

 

 

 

 

 


Click to close