Flow Charts and Design Structures

Flow chart is a symbol-oriented design system that identifies the type of statement by the shape of the symbol containing the statement.

These symbols are connected by flow lines that show the flow of control through the program.

  1. Flow Lines -Representing using arrow. ▫ It shows the flow control through the program.
  2. Terminal Symbol - It is used to indicate beginning and end of a subsection within the flowchart, known as a module.
  3. Input Output Symbol - It is used to indicate both input (READ) and output (WRITE). 
  4. Process Symbol - Indicates using a rectangle and represents calculations and initialization of memory locations.
  5. Preparation Symbol - This symbol is used for any initialization done, usually at the beginning of a program. 
  6. Decision Symbol - The diamond either asks a YES/NO questions OR makes a True/ False statement.
  7. Connector - This is used to connect the flow chats to represent its’ continuation.


Basic Design Structures 

• There are three generally accepted design structures; 

  1. Sequence 
  2. Selection 
  3. Iteration/ Loop 

• You should limit your designs to these structures. 

• Every structure has a single entrance flow line and a single exit flow line.  

Sequence Structure 

It is the simplest because it is nothing more than a series of statements performed one after another. It is a sequence because the flow lines always continue in the same direction when the structure is executed. A sequence could include many instructions, but each would be done in turn, in the same order.

Selection Structure 

It uses the decision symbol to ask a question. The structure includes the decision plus the operations done in response to the decision. There will be two exits from the decision box, but both branches are still a part of the section structure. Further, both branches must rejoin a single flow line to exit the structure.

  1. One Sided Selection -If the selection only has an operation on the true side (or less commonly, only on the false side), it is called a one-sided selection. With the one-sided structure, the "null" or empty side still must have its exit from the decision box, but there are no operations along the flow line.

Loop Structure 

 • It also uses the decision symbol since there must always be a way to get out of the loop. 

• The loop structure in general will have a decision, one or more additional symbols indicating the steps to be done within the loop, and a flow line that sends control back to the beginning of the loop. 

• There are two main loop types: 

  1. The while loop 
  2. The Until loop.

While Loops - While loops are leading decision loops, meaning that the decision symbol always is the first statement of the loop. If the test is true, control follows the flow line that goes into the loop. If the test is false, control follows the flow line to the first statement after the loop. In other words, we stay in the loop WHILE the decision is true.

Until Loop - Until loops are trailing decision loops, meaning the decision is always the last statement of the loop. The body of the loop will be executed once before control even gets to the loop test. In the until loop, if the test is false, control follows the flow line back to repeat the loop. If the test is true, control follows the branch from the decision box that exits the loop structure. We continue to repeat the loop UNTIL the decision is true. 





Internal Process 

• This variation of the process symbol indicates a call to a module that is within the same program. Internal process symbols are used to represent sub-modules. A "call" to an internal process transfers control to that process(module) without using flow lines to connect the two parts. An internal process helps us keep our design (our resulting program) organized. We can group tasks that are related into one module, so they can be easily checked and modified.

External Process 

• Another variation of the process symbol, this symbol indicates a call to a module that is not included within the current program. An external module would be something like a “utility” made available by the operating system or compiler or some other program. The external process call also indicates an automatic branch and return, but this time the branch is to a set of instructions outside the program.

Annotation Symbol 

• Allows you to add comments to your design without cluttering the flowchart itself. The comment is connected to the relevant box or area with a dashed line (so it isn’t confused with a flow line).





Comments