A flowchart is a diagram that shows the flow of information for a process/workflow. Therefore, it's also known as a process flow diagram. This flow of information, and it's subsequent processing, is depicted using various connected symbols.
In software engineering, flowcharts show the flow of information for algorithms. However, note that flowcharts are drawn independently of any programming language.
Flowcharts are applicable in every domain, but we'll focus on software engineering. Flowcharts help with:
While flowcharts can represent all different kinds of information flows, they do so using the symbols that are illustrated below. Additional symbols are used, but these are specific to the process/program whose flow we're modeling.
Note: The terminal symbol is always the first and last element of the flowchart.
Suppose we've got a program that inputs an integer, a, and outputs whether the integer is odd or even. The flowchart for this program is illustrated below:
We have a terminal symbol that depicts the start of the program, which leads to an input/output symbol for the input, and it leads to a process symbol for calculating the value of a%2
and assigning it to even
. This is followed by a decision symbol which determines if the value of even
is 0. There are then two input/output symbols following the decision symbol:
even
is 0.even
is not 0.Finally, the terminal symbol depicts the end of the program.
Free Resources