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 ...

Get Program Development in Java: Abstraction, Specification, and Object-Oriented Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.