Chapter 10. State Machines

Professional developers strive to create software that is correct. It is not too hard for even the ambitious amateur to achieve satisfactory responses for the most common use cases of a system, but it takes a professional to arrive at software that behaves as expected in all possible circumstances. Design-by-contractImage 4 provides a solid reasoning framework for achieving this goal. Its cornerstone is the precise specification of single method calls, as shown in Fig. 10.1(a). In this model, some client accesses a service provider object. It passes arguments, obeying the method’s pre-condition. The service provider must then ...

Get How to Use Objects: Code and Concepts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.