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

 

 

Chapter 5: Object Interaction

 

 

 

 

 

Text Box

 

Adds a text box to the diagram.

 

 

 

 

 

Note

 

Adds a note to the diagram.

 

 

 

 

 

Anchor Note to Item

 

Connects a note to an item in the diagram.

 

 

 

 

 

Object

 

Adds a new object to the diagram.

 

 

 

 

 

Object Message

 

Draws a message between two objects.

 

 

 

 

 

Message to Self

 

Draws a reflexive message.

 

 

 

 

 

Return Message

 

Shows a return from a procedure call.

 

 

 

 

 

Destruction Marker

 

Shows when an object is destroyed.

 

 

 

 

 

Procedure Call

 

Draws a procedure call between two objects.

 

 

 

 

 

Asynchronous Message

 

Draws an asynchronous message between two objects.

 

 

 

 

Collaboration Diagrams

Like Sequence diagrams, Collaboration diagrams are used to show the flow through a specific scenario of a use case. While Sequence diagrams are ordered by time, Collaboration diagrams focus more on the relationships between the objects. Figure 5.4 is the Collaboration diagram for John Doe purchasing a ticket for flight #1020.

Figure 5.4: Collaboration diagram for John purchasing a ticket

As you can see, the information that was in the Sequence diagram in Figure 5.3 is still here in the Collaboration diagram, but this diagram gives us a different view of the flow. In this diagram, it's easier to see the relationships between the objects. However, it's a little more difficult to see the sequencing information.

For this reason, you may want to create both a Sequence and a Collaboration diagram for a scenario. Although they serve the same purpose and contain the same information, each gives you a slightly different view. In Rose, you can create a Sequence diagram from a Collaboration diagram (or vice−versa) either by pressing F5 or selecting Browse → Create (Sequence/Collaboration) Diagram.

166