Using IPO Charts
An IPO chart is a simple but effective tool that programmers sometimes use for designing and documenting functions. IPO stands for input, processing, and output, and an IPO chart describes the input, processing, and output of a function. These items are usually laid out in columns: the input column shows a description of the data that is passed to the function as arguments, the processing column shows a description of the process that the function performs, and the output column describes the data that is returned from the function. For example, Figure 6-7 shows IPO charts for the ge Lregular- price and discount functions that you saw in Program 6-7.
Ifpife 6-7 IPO charts for the getRegularPrice and discount functions
- IPO Chart forthe get regular price Function
|
IPO Chart for the discount Function | ||
|
Input |
Processing |
Output |
|
An item's |
Calculates an item's discount |
The Item's discount |
|
regular price |
by multiplying the regular price | |
Average user rating: 5 stars out of 1 votes
Post a comment