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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

56<br />

Saturday Morning<br />

Association notation<br />

A line connecting an actor to a Use Case represents an association, as shown in Figure 5-7.<br />

The association represents the fact that the actor communicates with the Use Case. In fact,<br />

in earlier versions of the <strong>UML</strong> spec, this was called a Communicates With relationship. This<br />

is the only relationship that exists between an actor and a Use Case. According to the <strong>UML</strong><br />

spec, you may specify a directionality arrow on either end of the association line to denote<br />

the direction of the communication. Some associations are unidirectional (for example, the<br />

actor specifies information to the Use Case). Most associations are bidirectional (that is, the<br />

actor accesses the Use Case, and the Use Case provides functionality to the actor). For bidirectional<br />

associations, you may either place an arrowhead on both ends of the association<br />

line, or simply show no arrowheads at all. For simplification, most users tend to show no<br />

arrowheads at all. Most modeling tools provide the option to turn bidirectional arrows on or<br />

off. Just remember that the key is to identify which Use Cases the actors need to access.<br />

These connections will form the basis for the interfaces of the system and subsequent modeling<br />

efforts.<br />

Customer<br />

Withdraw Cash<br />

Update Account<br />

Withdraw Cash<br />

with Overdraft<br />

Protection<br />

Protect Overdraft<br />

Figure 5-7<br />

Association notation for the Use Case diagram<br />

Stereotype notation<br />

The stereotype notation is used throughout the <strong>UML</strong>, very commonly on Use Case dependencies,<br />

classes, and packages and other elements of the <strong>UML</strong> known as classifiers. The<br />

standard notation is to enclose the word in guillemets > (French quote marks), as in<br />

the notation below. Stereotypes provide a means to extend the <strong>UML</strong> without<br />

modifying it. A stereotype functions as a qualifier on a model element, providing more<br />

information about the role of the element without dictating its implementation.<br />

dependency notation<br />

Sometimes one Use Case may need to ask for help from another Use Case. For example, Use<br />

Cases titled Deposit Money and Withdraw Money may not actually update a bank account.<br />

They may delegate the changes to an existing Use Case called Update Account so that<br />

changes are controlled through a single feature that guarantees that all changes are done<br />

correctly.

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

Saved successfully!

Ooh no, something went wrong!