Chapter 2:
Flowcharting
8
Introduction
Flowchart is a graphical representation of an algorithm. Programmers often use it as a program-
planning tool to solve a problem. It makes use of symbols which are connected among them to
indicate the flow of information and processing.
The process of drawing a flowchart for an algorithm is known as “flowcharting” [6].
Intended Learning Outcome
Describe the flowchart symbols and functions
Explain the algorithms written in pseudocode or flow diagram
Create algorithms in flow diagrams to solve problems
I. What is a flowchart?
A flowchart is a type of diagram that represents a workflow or process.
A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-
by-step approach to solving a task.
They are widely used in multiple fields to document, study, plan, improve and
communicate often complex processes in clear, easy-to-understand diagrams.
A flowchart is a “formalized graphic representation” that illustrates a workflow or process
or a solution to a given problem.
They can range from simple, hand-drawn charts to comprehensive computer-drawn
diagrams depicting multiple steps and routes
Flowcharts are sometimes called by more specialized names such as Process Flowchart,
Process Map, Functional Flowchart, Business Process Mapping, Business Process Modeling
and Notation (BPMN), or Process Flow Diagram (PFD).
II. Flowcharts for computer programming/algorithms
As a visual representation of data flow, flowcharts are useful in writing a program or
algorithm and explaining it to others or collaborating with them on it.
Use a flowchart to spell out the logic behind a program before ever starting to code the
automated process.
Help to organize big-picture thinking and provide a guide when it comes time to code
More specifically, flowcharts can:
o Demonstrate the way code is organized.
o Visualize the execution of code within a program.
o Show the structure of a website or application.
o Understand how users navigate a website or program.
9
Often, programmers may write pseudocode, a combination of natural language and computer
language able to be read by people. This may allow greater detail than the flowchart and
serve either as a replacement for the flowchart or as a next step to actual code.
III. Types of Flowcharts listed by Alan B. Sterneckert
Document Flowcharts: These “have the purpose of showing existing controls over
document-flow through the components of a system. … The chart is read from left to right
and documents the flow of documents through the various business units.”
Data Flowcharts: These show “the controls governing data flows in a system. … Data
flowcharts are used primarily to show the channels that data is transmitted through the
system rather than how controls flow.”
System Flowcharts: These “show the flow of data to and through the major
components of a system such as data entry, programs, storage media, processors, and
communication networks.”
Program Flowcharts: These show “the controls placed internally to a program within a
system.
IV. Basic Flowchart Symbols
Symbol Name Function
The oval, or terminator, is used to
represent the start and end of a
Beginning or End
Terminator process. Often contains “Start” or
“End” within the shape.
The rectangle is your go-to symbol
once you've started flowcharting. It
represents any step in the process
you’re diagramming and is the
Process
workhorse of the flowchart diagram.
Use rectangles to capture process
steps like basic tasks or actions in
your process.
A parallelogram denotes any
function of input/output type.
Input / Output Input and output symbols show
where and how data is coming in
and out throughout your process.
10
A decision or branching point. Lines
representing different decisions
emerge from different points of the
diamond.
Indicates a question to be answered
Decision
usually yes/no or true/false. The
flowchart path may then split off
into different branches depending
on the answer or consequences
thereafter.
A line is a connector that shows
relationships between the
Arrow
representative shapes.
Indicates that the flow continues
where a matching symbol
Connector (containing the same letter) has
been placed. This symbol connects
separate elements across one page.
Indicates that the process continues
off page. This symbol connects
separate elements across multiple
Off Page
pages with the page number usually
placed on or within the shape for
easy reference.
What does a parallelogram flowchart symbol mean?
A parallelogram represents data in a flowchart. Data is either input a process requires or an output
that the process hands off to the next step. [7]
What is input and output in a flowchart?
Input and output are the fundamental building blocks of a process used to describe a software
program. For example, the input could be provided by a user like at an ATM machine or in a form
online or it could data provided by an instrument like a temperature read. The program will have
code to interpret the input and generate an output. The output could be a series of things: a
message printed on a user interface or data handed off to another process [7].
11
V. Comparison operators
> Greater than
>= Greater than or equal to
< Less than or equal to
<= Less than or equal to
== Equal to
!= Not equal to
Use the following set of comparison operators to compare two values. This operators can only be
in decision box.
Example:
For further reading please visit: [Link]
V. Tips for Better Flowcharts
Use Consistent Design Elements Shapes, lines and texts within a flowchart diagram
should be consistent.
Keep Everything on One Page It is good practice to make sure that the flowchart fits
on a single page and the text remains readable.
Flow Data from Left to Right Structuring a flowchart from left to right makes the
information easier to read and comprehend.
12
V. Sample Flowcharts
1. Find the sum of 10 and 15 and display the sum.
Start Start / Beginning of flowchart
Calculate Sum as
Calculate or add the 10 and 15 and store it to Sum
10 + 15
Display Display the value of Sum or the total or 10 and 15
Sum
End
End of Flowchart
2. Flowchart Example: Login Process
*Flowchart that uses decision to branch out
new process if the indicated question is true
or false.
13