Algorithms And Flowcharts Flashcards
Techniques of solving problems
❖ Representing a solution as pseudocode
❖ Writing an algorithm
❖ Drawing a flowchart
A typical programming task can be divided into two phases
Algorithms and Flowcharts
Problem solving
Implementation
produce an ordered sequence of steps that describe solution of
problem
Problem solving phase
implement the program in some programming language
Implementation phase
is an artificial and informal language that helps
programmers develop algorithms. Pseudocode is very similar
to everyday English.
Psuedocode
A graphical representation of the sequence of
operations in an information system or program.
Flowchart
Uses of flowchart
Flow chart are used in designing and
documenting complex processes.
•Like other types of diagrams, they help to
visualize what is going on and thereby help the
viewer to understand the process.
Denotes the beginning or end of the program
Oval
Denotes an input operation
Parallelogram
Denotes a process to be carried out e.g. addition, subtraction, division etc.
Rectangle
Denotes a decision (or branch) to be made. The program should continue along one of two routes. (e.g. IF/THEN/ELSE)
Diamond
Denotes an output operation
Hybrid
D
e
no
t
e
s
the
direction
of logic
flow in the program
Flow line
(represented by a small circle) allows you to connect two flowchart segments.
Connectors
In page connector (circle, A in the middle)
Out page connector (pentagon downwards)
The preparation or initialization of memory space of data
Initialization processing
showing control over a documentflow over a system
Document Flowchart
showing control over a data-flow in a
system
Data flowchart
showing control at a physical or
resource level
System Flowchart
showing the controls in a program
within a system.
Program flowchart
Flowchart Structures
•Sequence
•Decision
•Repetition or Loop
•Case
• a series of actions are
performed in sequence
• The pay-calculating
example was a sequence
flowchart.
Sequence
One of two possible actions is taken,
depending on a condition. It indicates a
yes/no question. If the answer to the
question is yes, the flow follows one path. If
the answer is no, the flow follows another
path
Decision Structure
One of several possible actions is taken, depending on
the contents of a variable.
Case Structure
Repeat actions while a condition remains true .
Repetition or Loop Structure