O'Reilly logo

Navigating C++ and Object-Oriented Design by Gail Anderson, Paul Anderson

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

1.4. Scenarios

The object model gives us a static picture of our system. That is, we depict classes and associations that are unchanging. However, systems are not static, and objects change as their data members change values. We can explore the dynamic behavior of a system through a technique known as scenarios: walking through a portion of our system, taking different paths.

For example, suppose we are modeling a digital answering machine that records, plays back, and erases messages. Here is a portion of our system, shown in Figure 1.14 . Base class Message has placeholder functions record(), erase() and playback(). Classes Out_Going_Message and In_Coming_Message both derive from Message. Class Machine controls an Out_Going_Message and many ...

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