SomeQuiz

Course

Flowcharts

Contributor

Neth Botheju

@nethbotheju

A flowchart is a diagram that represents a workflow or process. It is a graphical representation of the steps involved in completing a task, and the order in which those steps should be taken. That uses symbols, arrows, and connecting lines to depict the sequence of steps or activities involved. Flowcharts are used in a variety of fields, including computer science, engineering, and business.

Flowchart Symbols 🧩

Here is a chart for some of the common symbols used in drawing flowcharts.

How to draw a Flowchart 🤔

  • Start with a symbol: Begin by drawing a shape to represent the start or end of the process, using an oval shape.

  • Add input symbol: Draw a parallelogram to represent input. Inside the parallelogram write small description including a keyword like ‘Input’/’Read’.

  • Add process symbols: Draw rectangles with rounded corners to represent each action or step in the process. Write a brief description of the action inside each rectangle.

  • Connect the symbols: Use arrows to connect the symbols in the order they occur, indicating the flow or direction of the process.

  • Use decision symbols: Draw diamonds to represent points where a choice or decision needs to be made. Write a question or condition inside the diamond.

  • Connect decision symbols with arrows: Use arrows to connect the decision symbol to the symbols that follow each possible outcome. Label the arrows with "Yes" or "No" to indicate the path based on the decision.

  • Add repetition symbols: Draw a rounded rectangle or loop symbol to represent a repetition or loop point in the process. Write a condition or criteria for the loop inside the symbol.

  • Connect repetition symbols: Use arrows to connect the repetition symbol back to a previous point in the flowchart, creating a loop. Label the arrow with "Yes" or "No" based on whether the condition for the loop is satisfied or not.

  • Add output symbol: Draw a parallelogram to represent output. Inside the parallelogram write small description including a keyword like ‘Display’.

  • Include connectors and annotations: Add connectors, such as circles or squares, to join different parts of the flowchart if necessary. You can also include additional notes or explanations to clarify any steps or decisions.

  • Review and revise: Double-check the flowchart for accuracy, logical flow, and clarity. Make any necessary changes to ensure it accurately represents the process, including the repetition or loop points.

The Three Basic Control Structures

There are some standard ways of connecting the symbols to represent the three basic structures.

  • Sequence
  • Selection
  • Repetition

Sequence

A sequence flowchart is a type of flowchart that represents steps that are taken in a specific order. The most common symbols used in sequence flowcharts are the rectangle, which represents a process step, and the arrow, which represents the flow of the process.

📎 Example

In this flowchart, the steps are shown in the order that they should be performed to calculate two numbers.

  • The first step is inputting the first number.

  • The second step is inputting the second number.

  • The third step is calculate two numbers and assign it to a variable called z.

  • The fourth step is display the answer/display the z.

Selection

Selection is known as branching. A selection flowchart is a type of flowchart that is used to represent the selection control structure in computer programming. The selection control structure allows one set of statements to be executed if a condition is true and another set of actions to be executed if the condition is false.

📎 Example

In this flowchart, the steps are shown in the order that they should be performed to check whether adult or child.

  • The first step is inputting the age.

  • The second step is checking whether the age is over 18 or not.

  • The third step is if the age is above 18 it will displays “ADULT” if not it will display “CHILD”.

  • The fourth step is display the answer/display the z.

There are three ways you can draw selection using diamond symbol.

The true and false sides of a flowchart decision symbol can be changed based on the requirements of the process being represented.

Repetition

Selection is known as looping or repeating. A repetition flowchart is a type of flowchart that is used to represent the repetition control structure in computer programming. The repetition control structure allows a set of statements to be executed repeatedly until a certain condition is met.

📎 Example

This flowchart represents a simple program that prints the message "Hello!" a certain number of times. The number of times the message is printed is specified by the user input.

  • The flowchart starts by creating two variables.

  • Inputting the number. Initializing a counter to 1.

  • Then, the flowchart enters a loop.

  • The loop will be repeated as long as the counter is less than or equal to the number of times to repeat.

  • Inside the loop, the message "Hello!" is printed and the counter is incremented by 1.

  • Once the counter is greater than the number of times to repeat, the loop terminates and the flowchart ends.

  • Always you drawing a repetition part in a flowchart you should add counter increasers count = count+1 or decreases count = count-1 .

Repetition flowcharts are a powerful tool for representing repetitive tasks. They can be used to represent a wide variety of programs, from simple loops to complex algorithms.

When creating a flowchart to represent a program that uses variables, it is best to initialize the variables at the beginning of the flowchart, inside a rectangle symbol. This will help to ensure that the variables are initialized before they are used in the flowchart.

Connectors

There are two types of connectors in flowchart.

  • On page connector
  • Off page connector

On page connector

An "on-page connector" is a type of connector used in flowcharts to join different parts of the flowchart that are located on the same page or section. It helps in improving the readability and clarity of the flowchart by reducing the complexity of crossing lines.

When a flowchart becomes large or complex, it may be necessary to place certain symbols or steps in different areas of the page to maintain a clear and organized layout. However, it can become confusing if the lines connecting these symbols cross over each other.

📎 Example

Off page connector

An "off-page connector" is a type of connector used in flowcharts to connect different parts of the flowchart that are located on different pages or sections. It allows for the continuation of the flow from one part of the flowchart to another, which may be located elsewhere in the document.

Off-page connectors are particularly useful when a flowchart becomes too large to fit on a single page or when certain steps or decision points need to be represented in more detail on separate pages.

📎 Example

General rules for flowcharting

  1. All boxes of the flowchart are connected with Arrows. (Not lines)
  2. Flowchart symbols have an entry point on the top of the symbol with no other entry points. The exit point for all flowchart symbols is on the bottom except for the Decision symbol.
  3. The Decision symbol has two exit points; these can be on the sides or the bottom and one side.
  4. Generally a flowchart will flow from top to bottom. However, an upward flow can be shown if required.
  5. All flow charts start and end with a Terminal.