You are on page 1of 15

I.P.O.

Charts
Defining the problem is the first step towards solving a problem. It is one
of the most important steps in problem solving.

Defining the problem is a way to help a programmer understand what


he/she is required to do.

It involves decomposing the problem into three key components:

(1) What is given. [i.e. the input(s)]

(2) The tasks that must be performed. [i.e. the processing]

(3) The expected results. [i.e. the output(s)]

CSEC Information Technology –A Guide To Problem-Solving and


Programming Prepared by P. Francis-Cobley
I.P.O. Chart/Defining Diagram
A formal approach to defining a problem is to construct an I.P.O. Chart/Defining
Diagram.

An I.P.O. Chart/Defining Diagram is a table with three columns. These three columns
represent the three components:
 Input
 Processing
 Output

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


I.P.O. Chart/Defining Diagram
An I.P.O. Chart/ Defining Diagram is a helpful diagrammatical way to start. Simply
start with the following outline table.

Input Processing Output


Identify all input(s) here Identify the processing that Identify all output(s) here
needs to take place to
convert the input data into
the output information

Information Technology for CSEC Examinations 3 rd Edition Howard Campbell and Alan Wood
I.P.O. Chart/Defining Diagram
The Input is the source data provided.

It can be easily identified by the keywords that precedes it-


 Read
 Accept
 Give
 Get
 Input

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


I.P.O. Chart/Defining Diagram
The Processing is the list of actions that are to be performed to achieve the required output.

It can be easily identified by the keywords that precedes it–


 Calculate
 Compute
 Determine
 Find
 Evaluate

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


I.P.O. Chart/Defining Diagram
The Output is the end result required.

Keywords that help identify the output are-


 Print
 Display
 Produce
 Output

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


Let’s look at this very
Simple Problem.

Write a program that accepts


the weights of two people in
pounds. It then determines
the total weight of the two
people in pounds.
It then displays the Total
Weight in pounds.
 
Problem
Write a program that accepts the weights of two people in pounds. It then determines the total weight of the two people in
pounds. It then displays the Total Weight in pounds.

The first step is to identify the input (i.e. The data that is given).

The keyword accepts identifies the inputs as the weight of two people in pounds.

Input Processing Output


Weights of 2 people in
pounds.

Input Processing Output

Weight of person 1 in pounds.


Weight of person 2 in pounds

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


Problem

Write a program that accepts the weights of two people in pounds. It then determines the total weight of the two people in
pounds. It then displays the Total Weight in pounds.

The next step is to identify the output (i.e. The data that is given).

The keyword displays identifies the output as the Total weight of two people in pounds

Input Processing Output


Weights of 2 people in Total Weight of the two
pounds. people in pounds.

Input Processing Output

Weight of person 1 in pounds. Total Weight of the two


Weight of person 2 in pounds people in pounds.

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


Problem

Write a program that accepts the weights of two people in pounds. It then determines the total weight of the two people in
pounds. It then displays the Total Weight in pounds.

The final step in defining this problem is to list the Processing Steps. Here, we list all the actions that must be performed in
order to get the desired results.

What do we have to do with the two weights in pounds to get the Total Weight in pounds.
Input Processing Output
Weights of 2 people in pounds. (1) Read  the Weights of two people in Total Weight of the two people in pounds.
pounds.  
(2) Calculate  the Total Weight in pounds.
(3) Print  the Total Weight in pounds. 

Input Processing Output

Weight of person 1 in pounds. (1) Read  the Weight of person 1 in Total Weight of the two people in pounds.
pounds.
Weight of person 2 in pounds (2) Read  the Weight of person 2 in
pounds.
(3) Calculate  the Total Weight in pounds.
(4) Print  the Total Weight in pounds. 

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


Alternative words that can be used in the I.P.O. Chart/Defining Diagram

Input Processing Output


Weights of 2 people in pounds. (1) Read  the Weights of two people in Total Weight of the two people in pounds.
pounds.  
(2) Calculate  the Total Weight in pounds.
(3) Print  the Total Weight in pounds. 

Input Processing Output

Weight of person 1 in pounds. (1) Read  the Weight of person 1 in Total Weight of the two people in pounds.
pounds.
Weight of person 2 in pounds (2) Read  the Weight of person 2 in
pounds.
(3) Calculate  the Total Weight in pounds.
(4) Print  the Total Weight in pounds. 

CSEC Information Technology –A Guide To Problem-Solving and Programming Prepared by P. Francis-Cobley


Assignment #1
Create an I.P.O. Chart for the following problem.

Problem #1-
Write a program that gets the length and the breadth of a room in feet. It then finds
and displays the area that needs to be carpeted.
Assignment #2
Create an I.P.O. Chart for the following problem.

Problem #2-
Write a program to accept the ages of three people, determine and print the average
age of the three people.
The End

You might also like