Module 2
Module 2
DEVS 1/0
General problem
1
solving
Introduction
Looking at how to
Analyze a problem and
Plan a solution to it using a five-step problem
solving approach.
This approach can be used for
Everyday/general life situations or
For problems that can be solved by programming.
Programming can be defined as the development of a
solution to an identified problem.
2
Introduction (… 2)
Computerprogramming is an art.
Many people believe that a programmer must
be good at mathematics,
have a memory for figures and technical information, and
spend many hours sitting at a computer typing programs.
4
General problem solving approach
5
Problem solving example#1
8
Problem solving example#2 - Solution
1) Insert card
2) Enter your pin number
3) Select / Enter amount you want
4) Select type of account
5) Take card
6) Take money and receipt
9
Problem solving example#3
Write a letter.
10
Problem solving example#4
Wash your clothes.
(You may use a bucket instead of a basin; soap instead of
washing powder, etc. Answers should make sense.)
11
Problem solving example#5
Going to school.
(Write a detailed set of instructions, in
sequence to complete the above task
(minimum 6 steps for each):
12
Home work exercises
Write a detailed set of instructions, in sequence
to complete the following task (minimum 6
steps for each):
1. Buy a book at a shop
2. Make a cup of tea for your self.
3. Cook an egg for your self.
4. Washing a car
13