0% found this document useful (0 votes)
6 views18 pages

Problem Solving 3

Module 2 focuses on problem analysis and design, emphasizing the importance of clearly defining problems, understanding requirements, and using the IPO model to break down problems into manageable parts. It covers identifying constraints and assumptions that may affect system performance, as well as the basics of algorithm development. The module aims to equip programmers with the skills to think critically and systematically before coding.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views18 pages

Problem Solving 3

Module 2 focuses on problem analysis and design, emphasizing the importance of clearly defining problems, understanding requirements, and using the IPO model to break down problems into manageable parts. It covers identifying constraints and assumptions that may affect system performance, as well as the basics of algorithm development. The module aims to equip programmers with the skills to think critically and systematically before coding.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE 2: PROBLEM

ANALYSIS AND DESIGN


Dr. Johnwendy C.N.

1
Problem Analysis and Design
Unit 2.1: Problem Definition and Understanding Requirements
Unit 2.2: Input, Process, Output (IPO Model)
Unit 2.3: Breaking Problems into Sub-problems
(Decomposition)
Unit 2.4: Identifying Constraints and Assumptions
Unit 2.5: Algorithm Development Basics

2
Overview
Before writing any code, a programmer must:
➢Understand the problem
➢Break it down
➢Plan a solution
➢This module teaches you how to think like a problem
solver before coding.

3
Problem Definition
Clearly stating what the problem is and what needs to be solved.
Simple Example
Problem:
“Students are failing exams.”
Bad definition
→ “Students are failing.”
Good definition
→ “Students are failing due to lack of study tracking and performance
feedback.”
A good problem definition is specific and clear.

4
Understanding Requirements
Requirements are:
What the system must do
Types:
Functional Requirements (what the system does)
Example: “System should calculate student GPA”
Non-functional Requirements (how the system behaves)
Example: “System should respond in 2 seconds”

5
Example (Real-world system)

System: Student Result System


Functional:
Input scores
Calculate average
Display grade
Non-functional:
Fast response
Secure login
6
Unit 2.2: Input, Process, Output (IPO
Model)
What is IPO?
A simple way to understand any problem:
Table 1: IPO Model
Stage Meaning
Input Data given
Process What you do
Output Result

7
Examples
Example 1: Simple Calculation Example 2: ATM Withdrawal
Problem: Find average score Input → Card + PIN + amount
Input → Scores (50, 60, 70) Process → Verify + deduct
Process → Add + divide Output → Cash + receipt
Output → Average (60)

8
Why IPO is important

➢It helps you:


➢Understand the flow of a problem
➢Design programs easily

9
Unit 2.3: Breaking Problems into Sub-
problems (Decomposition)
What is Decomposition?
Breaking a big problem into smaller, easier parts
Example: Build a Student System
Big problem
→ “Create student system”
Break it down
Register student
Store data
Calculate result
Display report
10
Why it matters
➢Makes problems easier
➢Helps teamwork
➢Helps debugging
➢Computers also solve problems step-by-step like this.

11
Unit 2.4: Identifying Constraints and
Assumptions
Constraints are: Limitations or restrictions
Examples
Time constraint → “System must respond in 2 seconds”
Memory constraint → “Use limited storage”
Budget constraint → “Use free tools”

12
Assumptions
Assumptions are:
Things you believe are true (even if not stated)
Examples
➢“User has internet”
➢“Input will be correct”
➢“Students will enter valid scores”

13
Why this matters
Why this matters
If assumptions are wrong:
Your system may fail
Example:
If you assume “internet is always available”
But user is offline → system crashes

14
Unit 2.5: Algorithm Development Basics
What is an Algorithm?
A step-by-step procedure to solve a problem
Example 1: Find Largest Number
Steps:
Start
Input numbers
Compare numbers
Display largest
End
15
Unit 2.5: Algorithm Development Basics
Example 2: Withdraw Properties of a Good
Money Algorithm
Insert card Clear
Enter PIN Finite (ends)
Check PIN Step-by-step
Enter amount Efficient
Dispense cash

16
Ways to represent Algorithm
Pseudocode
Simple English-like steps
START
INPUT score
IF score >= 50
PRINT "Pass"
ELSE
PRINT "Fail"
END

17
Final Summary

Unit Key Concept


2.1 Define problem clearly
2.2 Use IPO to understand flow
2.3 Break problem into parts
Know limits (constraints) +
2.4
assumptions
2.5 Design step-by-step algorithm

18

You might also like