A clearly defined problem that is already
half the solution.
Problem Definition (Step 1)
• Break down the problem into
smaller parts
• Identify the input (data you
start with) and output (the
desired result
Problem Analysis (Step 2)
• Create a step-by-step plan to
solve the problem.
• Algorithms can be written in
plain language, as a picture
(flowchart), or in a code-like
way (pseudocode).
Algorithm Design and Representation (Step 3)
EXPRESSING OUR SOLUTION
THROUGH HUMAN LANGUAGE
EXPRESSING OUR SOLUTION
THROUGH A PSEUDOCODE:
A schematic representation of a sequence of operations, as in a manufacturing process or computer program. A graphical representation of the sequence of operations in an information system or program. Shows how data flows from source documents through the computer to final distribution to users.
Flowchart
Symbols in order:
Terminal Symbol (oval shaped)
Input/output Symbol (rectangle with parallel end)
Process Symbol (rectangle shaped)
Flowline Symbol (cross arrow)
Decision Symbol (diamond plane shaped)
Connector Symbol (Circle)
After constructing the algorithm,
it is now possible to create the
source code. Using the algorithm
as a basis, the source code can
now be written using the chosen
programming languag
Coding and Debugging (Step 4)
Types of Errors
Occurs if there is a syntax error in
the code.
Compile-Time Error or Syntax Error
Compilers are not perfect, and so they cannot catch all errors at compile time. This is especially true for logic errors, such as infinite loops.
Runtime Errors