
340 CHAPTER 6 Processes and Operating Systems
6.7.2 Specification
Figure 6.21 shows the class diagram for the answering machine. In addition to
the classes that perform the major functions, we also use classes to describe the
incoming and OGMs. As seen below, these classes are related.
The definitions of the physical interface classes are shown in Figure 6.22. The
buttons and lights simply provide attributes for their input and output values. The
phone line, microphone, and speaker are given behaviors that let us sample their
current values.
The message classes are defined in Figure 6.23. Since incoming and OGM types
share many characteristics, we derive ...