Jump to content

Programming Fundamentals/Input-Process-Output Model

From Wikibooks, open books for an open world

Overview

[edit | edit source]

The input–process–output (IPO) model is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or another process. The IPO model is the most basic structure for describing a process.[1]

Discussion

[edit | edit source]

A computer program or any other sort of process using the input-process-output model receives inputs from a user or other source, does some computations on the inputs, and returns the results of the computations. The system divides the work into three categories:[2]

  • A requirement from the environment (input)
  • A computation based on the requirement (process)
  • A provision for the environment (output)

For example, a program might be written to convert Fahrenheit temperatures into Celsius temperatures. Following the IPO model, the program must:

  • Ask the user for the Fahrenheit temperature (input)
  • Perform a calculation to convert the Fahrenheit temperature into the corresponding Celsius temperature (process)
  • Display the Celsius temperature (output)

Pseudocode

[edit | edit source]
Function Main
    ... This program converts an input Fahrenheit temperature to Celsius.

    Declare Real fahrenheit
    Declare Real celsius
    
    Output "Enter Fahrenheit temperature:"
    Input fahrenheit

    Assign celsius = (fahrenheit - 32) * 5 / 9

    Output fahrenheit & "° Fahrenheit is " & celsius & "° Celsius"
End

Output

[edit | edit source]
Enter Fahrenheit temperature:
100
100° Fahrenheit is 37.7777777777778° Celsius

Flowchart

[edit | edit source]

Fahrenheit to Celsius flowchart

References

[edit | edit source]