Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 9: Object Behavior

Summary

In this chapter, we took a look at the Statechart diagram, another of the UML diagrams supported by Rose. Although source code is not generated from these diagrams, they can prove invaluable when examining, designing, and documenting the dynamic behavior of a class.

A Statechart diagram shows the various states in which an object can exist, how the object moves from one state to another, what happens in each state, and what happens during the transitions from one state to another. All of this information is part of the detailed design of the class. The developers can use this information when programming the class.

In Rose, you can create a Statechart diagram for a class, an operation, a package, or a use case. You can create as many Statechart diagrams per class as you'd like to show the states and transitions for the class. Not every class will need a Statechart diagram, only those with significant dynamic behavior. To determine whether a class has significant dynamic behavior, you can examine the values its attributes can have and the relationships the class can have.

In the next chapter, we'll prepare for source code generation by examining the Component view of Rose. In the Component view, we'll move from the logical design to the physical design and look at the code libraries, executable files, and other components of a system.

359