O'Reilly logo

Program Development in Java: Abstraction, Specification, and Object-Oriented Design by John Guttag, Barbara Liskov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required