O'Reilly logo

How to Use Objects: Code and Concepts by Holger Gast

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

Chapter 6. Fine Print in Contracts

Contracts form a solid framework for arguing about the correctness ofImage 4 code: Class invariants capture the consistency of the objects’ internal structures, while the pre- and post-conditions of methods describe the objects’ behavior to clients without requiring knowledge of the objects’ internals. Within methods, the workings of the code can be traced in detail, down toImage 4.2.3 formalizing the effects of individual statements. 4.7

The presentation so far has established the terminology and common reasoning patterns. ...

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