Professional Documents
Culture Documents
SOLVING USING
COMPUTER
PREPARED BY: MS. SITI HASRINAFASYA CHE HASSAN
REFERENCE TO: SUHANA SULONG, ET. AL.
TOPICS TO BE COVERED
What is a problem?
A state of difficulty that needs to be resolved or a
question raised for consideration or solution.
What is a solution?
An action to solve a problem.
2 problem solving strategies: Algorithmic & Heuristic.
ALGORITHMIC vs. HEURISTIC
Algorithmic Solution Heuristic Solution
Its method is a clearly specified Its method involves intelligent
procedure that is guaranteed trial and error or reasoning
to give the correct answer. based on knowledge and
experience.
Examples? Eg: How to become a
millionaire in 21 days?, How to
score straight A’s in exam?
TYPICAL SIMPLE PROBLEM SOLVING
PROBLEM Define
problem
Design
algorithm
Difficult path
Solve
problem
USING PROBLEM SOLVING STRATEGY WILL
HELP TO SOLVE THE REAL WORLD
PROBLEM
Control
Transaction problem
REAL WORLD
PROBLEMS
Decision Searching
making problem
Sorting
problem
Example ATM machine provide many kind of
service to customers such as money
withdrawal, money transfer, check
balance and etc. Customer can choose
any service that they want by choosing
the menu on ATM display.
selection control structured.
A program MUST be systematically and
properly designed before coding begins.
This design process results in the
construction of an ALGORITHM.
WHAT IS AN ALGORITHM?
A set of sequential instructions that are followed to solve a
problem.
In programming terms, it can be defined as a set of detailed,
unambiguous and ordered instructions developed to describe the
processes necessary to produce the desired output from a given
input. PSEUDOCODE AND FLOWCHART ARE
THE MOST POPULAR WAYS OF
REPRESENTING ALGORITHMS
PROBLEM SOLVING
DEVELOPMENT CYCLE
TWO (2) phases to perform problem solving:
i. Problem Solving phases:
- Problem Definition and Algorithm Design.
ii. Implementation phases:
- Algorithm implementation, program testing and program
maintenance.
Phase 1: Problem Definition
Enter a length:
Enter a width:
The area of a rectangle:
Screen 2: