9 Specifications

Throughout this book, we emphasize the importance of specifications in all stages of program development. Our main premise is that the proper use of abstraction is the key to good programming. Without specifications, abstractions are too intangible to be helpful. In this chapter, we discuss the meaning of specifications and some criteria to consider when writing them. We also discuss two primary uses of specifications.

9.1 Specifications and Specificand Sets

The purpose of a specification is to define the behavior of an abstraction. Users will rely on this behavior, while implementors must provide it. An implementation that provides the described behavior is said to satisfy the specification.

We define the meaning of a specification ...

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.