3 Procedural Abstraction
In this chapter, we discuss the most familiar kind of abstraction used in programming, the procedural abstraction, or procedure for short. Anyone who has introduced a subroutine to provide a function that can be used in other programs has used procedural abstraction. Procedures combine the methods of abstraction by parameterization and specification in a way that allows us to abstract a single action or task, such as computing the greatest common demoninator (
gcd) of two integers or sorting an array.
A procedure provides a transformation from input arguments to output arguments. More precisely, it is a mapping from a set of input arguments to a set of output results, with possible modifications of the inputs. The set ...