Download - LEC03 Flowcharts
-
7/31/2019 LEC03 Flowcharts
1/15
1
LECTURE 03
FLOWCHARTS
-
7/31/2019 LEC03 Flowcharts
2/15
2
Flowcharts
- Pictographic Representation ofAlgorithms
-
7/31/2019 LEC03 Flowcharts
3/15
3
What Is A Flowchart?
A flowchart is a diagrammatic representationthat illustrates the sequence of operations to beperformed to get the solution of a problem.
generally drawn in the early stages offormulating computer solutions
facilitate communication between programmersand business people
play a vital role in the programming of a problemand is helpful in understanding the logic ofcomplicated and lengthy problems
-
7/31/2019 LEC03 Flowcharts
4/15
4
Flowchart Symbols
Start or end of the program Computational steps or
processing function of a program Input or output operation
Decision making and branching
Connector or joining of two partsof program
-
7/31/2019 LEC03 Flowcharts
5/15
5
Flowchart Symbols
Magnetic Tape
Magnetic Disk
Off-page connector
Flow line
Annotation
Display
-
7/31/2019 LEC03 Flowcharts
6/15
6
Flowchart Guidelines1. In drawing a proper flowchart, all necessary
requirements should be listed out in logical order.
2. The flowchart should be clear, neat and easy to follow.There should not be any room for ambiguity in
understanding the flowchart.3. The usual direction of the flow of a procedure or
system is from left to right or top to bottom.
4. Only one flow line should come out from a processsymbol.
-
7/31/2019 LEC03 Flowcharts
7/15
7
Only one flow line should come out from a
process symbol.
Flowchart Guidelines
-
7/31/2019 LEC03 Flowcharts
8/15
8
Only one flow line should enter a decision
symbol, but two or three flow lines, one
for each possible answer, should leavethe decision symbol
Flowchart Guidelines
Y N
-
7/31/2019 LEC03 Flowcharts
9/15
9
Only one flow line is used in conjunction
with terminal symbol
Flowchart Guidelines
-
7/31/2019 LEC03 Flowcharts
10/15
10
Flowchart Guidelines
Write within standard symbols briefly. As
necessary, you can use the annotation
symbol to describe data or computationalsteps more clearly.
This is top secret
-
7/31/2019 LEC03 Flowcharts
11/15
11
Flowchart Guidelines
If the flowchart becomes complex, it is better touse connector symbols to reduce the numberof flow lines. Avoid the intersection of flow linesif you want to make it more effective and betterway of communication.
Ensure that the flowchart has a logical startand finish.
It is useful to test the validity of the flowchartby passing through it with a simple test data.
-
7/31/2019 LEC03 Flowcharts
12/15
12
Advantages Of Using
Flowcharts1. The benefits of flowcharts are as follows:
2. Communication: flowcharts are better way ofcommunicating the logic of a system to all
concerned.3. Effective analysis: with the help of flowchart,
problem can be analyzed in more effectiveway.
4. Proper documentation: program flowchartsserve as a good program documentation,which is needed for various purposes.
-
7/31/2019 LEC03 Flowcharts
13/15
13
Advantages Of Using
Flowcharts1. Efficient coding: the flowcharts act as a guide
or blueprint during the systems analysis andprogram development phase.
2. Proper debugging: the flowchart helps indebugging process.
3. Efficient program maintenance: themaintenance of operating program becomes
easy with the help of flowchart. It helps theprogrammer to put efforts more efficiently onthat part.
-
7/31/2019 LEC03 Flowcharts
14/15
14
Limitation Of Using Flowcharts Complex logic: sometimes, the program logic is quite
complicated. In that case, flowchart becomes
complex and clumsy.
Alterations and modifications: if alterations are
required the flowchart may require re-drawing
completely.
Reproduction: as the flowchart symbols cannot be
typed, reproduction of flowchart becomes a problem.
The essentials of what is done can easily be lost in
the technical details of how it is done.
-
7/31/2019 LEC03 Flowcharts
15/15
15
A Sample Flowchartstart
stop
sum = 0
n = 0
n = n + 1
sum = sum + n
Is n = 10?
print sum
no yes