Flowcharts and
Algorithms
A computer works by performing a list of
instructions called computer programs.
These are written by programmers using a
programming language.
Everything a computer does is done by
using computer program.
Programming
Concepts
For the computer program to be successful,
it should be well planned and executed
properly. A computer programmer must
follow these six stages in developing a
computer program:
Six Stages in developing a computer
program:
1. Defining the Problem/Problem Analysis
2. Designing a Solution/Program Design
3. Coding/Writing a program
4. Testing and Debugging of the System
5. Implementation/Documentation of the
Program
6. Maintenance
1. Defining the Problem/Problem
Analysis
The programmer must determine what data
are needed, what form they are to be in,
what information should the program be
generated, and how the data are to be
manipulated to produce this result.
2. Designing a Solution/Program
Design
In designing the solution, we must break
down the problem into several steps so that
it is easier for us to solve the problem in
smaller pieces. This sequence of steps to
come up with the solution to the problem is
called an Algorithm.
Algorithm
Is an English-like way of writing and expressing a
solution to a problem. It is a step by step list of
instructions. Algorithm or pseudo-code is like a
flowchart. It helps us to construct the actual
program easily and clearly.
The creator of the algorithm is Muhammad ibn
Musa al-Khwarizmi
Flowchart
It is a graphical representation of a program.
It shows the logical sequence of instruction
which a computer has to follow. The
individual instructions in the flowchart are
connected by arrow lines. These lines
indicate the order on how the instructions
are followed or executed by the computer.
Three basic main operation
in computer program:
Input- To enter data
Process – To calculate or make choices
Output - To produce a result or report
Input Process Output
Symbol Name Meaning and Usage
Oval Terminal Symbol Signifies the start or end of a
program
Parallelogram Input / Output Symbol Indicates where the data are
to be entered or results to be
displayed
Rectangle Process Symbol Specifies processing
procedures that usually
involves calculations
Diamond Decision Symbol Denotes a choice or decision
to be made by the computer
Arrow Heads Flow Lines Specifies the sequence or
order of instruction
Connector Flow Connector (On-Page Connects various sub-parts of
Connector) a flowchart. The circle can
contain a number or letter
Hexagon Initialization Symbol Initializes or stores the first
values of the variables
Pentagon Off-Page Connector Connects the flowchart to the
Example of a System Flowchart
3. Coding/Writing a program
-A program is a list of instructions written in a
programming language that a computer can
execute so that machine in a predetermined
way.
- Comments are statements that have no effect
on the program.
4. Testing and Debugging of the
System
Testing - is the process of evaluating a program to
ensure it meets its requirements and functions as
expected. It involves systematically running the program
under various conditions to identify errors, bugs, or
unexpected behavior.
Debugging - is the process of identifying, analyzing,
and fixing errors or bugs detected during testing.
5. Implementation/Documentation of
the Program
-It refers to the process of deploying the program into a
real-world environment where it can be used by the
end-users. It involves transitioning from development
to actual usage.
- It is the process of creating written records that
explain various aspects of the program. It ensures the
program's functionality, design, and usage are clear to
developers, users, and stakeholders.
6. Maintenance
Maintenance refers to the process of updating
and improving a program after its deployment to
ensure it continues to meet user needs, remains
error-free, and adapts to changes in technology or
requirements. It is the final phase of the Software
Development Life Cycle (SDLC) and is critical for
the program's long-term success.
The End
Activity:
Flowchart Creation:
Example Algorithm:
Morning routine Convert the given
algorithm into a
Wake up. flowchart using basic
Turn off the shapes:
alarm.
Get out of bed. Oval for Start/End
Brush teeth. Rectangle for Process
Eat breakfast. Diamond for Decision
Go to school