01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

174<br />

Saturday Afternoon<br />

REVIEW<br />

The dynamic view includes diagrams designed to illustrate how objects work together. The<br />

Sequence and Collaboration diagrams specifically show how objects talk to one another to<br />

accomplish a goal of the system, one scenario in a Use Case, or one operation.<br />

The Sequence diagram is built around three fundamental elements: the objects, messages,<br />

and the object lifeline. The objects represent the participants. The messages<br />

represent the communication that they send to one another. The object lifelines<br />

allow us to arrange the messages in the proper relative sequence.<br />

Messages may be synchronous (requiring a response) or asynchronous (not requiring<br />

a response). A simple or synchronous message uses a solid line with a solid arrowhead.<br />

The asynchronous message uses a solid line with a stick arrowhead. Both of<br />

these message types represent the invocation of an operation on the object they are<br />

pointing to. So the name of the message becomes an operation signature with the<br />

name, arguments, and return type.<br />

The return from or answer to a message uses a dashed line and a line-style arrowhead.<br />

The return is simply information, so it is written on the return arrow.<br />

A message may be conditional on some prior result. This can be shown using the<br />

guard condition notation placed in front of the operation name.<br />

An object may be active or inactive at various times in the Sequence diagram. <strong>To</strong><br />

show that an object is busy, use a narrow vertical rectangle, called an activation bar,<br />

on the object lifeline from the time the object becomes active to the time that it<br />

stops. An object usually becomes active because it has been asked to do something.<br />

It becomes inactive when it is finished with the current task.<br />

When an object is deleted or destroyed, the timeline ends and an X marks the<br />

termination.<br />

QUIZ YOURSELF<br />

1. What does the dynamic view represent (See “Knowing the purpose of Sequence<br />

and Collaboration diagrams.”)<br />

2. Where do you place the participating objects in a Sequence diagram (See<br />

“Defining the basic notation of the Sequence diagram.”)<br />

3. How does the Sequence diagram show that one object tells another object to do<br />

something (See “Defining the basic notation of the Sequence diagram.”)<br />

4. How does the Sequence diagram show that an object is busy (See “Defining the<br />

extended notation for the Sequence diagram.”)<br />

5. How does the Sequence diagram show that an object no longer exists (See<br />

“Defining the extended notation for the Sequence diagram.”)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!