Programming Fundamentals/Variables/Input-Process-Output Model
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 other process. This activity introduces the IPO model using a simple calculation. This activity will help you understand how to design a simple program.
Objectives[edit | edit source]
- Understand the input-process-output model.
- Create a simple program using a visual programming environment.
Prerequisites[edit | edit source]
- Review Creating Flowcharts.
- Review MathsIsFun: Temperature Conversion.
- The formulas for temperature conversion are:
- C = (F - 32) * 5 / 9
- F = C * 9 / 5 + 32
- An operator is a character or symbol used to perform an arithmetic, logical, or bitwise operation on one or more operands.
- String concatenation is the joining of character strings end-to-end.
- An assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable.
Introduction[edit | edit source]
Review the flowchart example on the right.
Questions[edit | edit source]
- What flowcharting symbol is used to indicate the beginning and ending of a program?
- What flowcharting symbol is used to indicate annotations or comments?
- What flowcharting symbol is used to indicate variable declaration?
- What flowcharting symbol is used to indicate input and output?
- What flowcharting symbol is used to indicate a process or calculation?
- What operator is used for addition, subtraction, multiplication, and division?
- What operator is used for assignment?
- What operator is used for string concatenation?
Activity[edit | edit source]
With a partner, perform the following:
- Using a visual programming language, create a program matching the flowchart on the right.
- Save the program.
- Test the program with known Fahrenheit-Celsius temperature pairs to make sure it works correctly.
- Trade places, so that both partners have an opportunity to "drive" the visual programming environment.
- Copy the program and change it so that it performs the opposite calculation, converting Celsius temperatures to Fahrenheit.
- Save the program.
- Test the program with known Celsius-Fahrenheit temperature pairs to make sure it works correctly.
Applications[edit | edit source]
- Identify specific steps which must be followed when creating a program using the Input-Process-Output model.
- Discuss your activity experience with your classmates. What surprised you? What have you learned that you can apply to your own school or work environment?