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.

138<br />

Saturday Afternoon<br />

REVIEW<br />

The Class diagram models the resources of the problem domain. Associations represent the<br />

rules that govern the relationships between the resources. Multiplicity defines the allowable<br />

combinations of objects in a relationship. Qualified associations provide a means to access<br />

one or more objects with an identifier, thus reducing search time and complexity.<br />

<strong>To</strong> build the Class diagram, follow the steps described in Sessions 9 through 11:<br />

1. Identify the classes, name them, and define them so you know why they are<br />

part of the model.<br />

2. Identify, name, and define the associations between pairs of classes. Watch<br />

out for reflexive associations as well. Assign multiplicity and constraints<br />

where needed. If naming an association is difficult, try role names.<br />

3. Evaluate each association to determine whether it should be defined as<br />

aggregation. If it is aggregation, then could it be composition<br />

4. Evaluate the classes for possible specialization or generalization.<br />

Patterns define a common solution to a common problem. Patterns identify the<br />

problem needing a solution, the resources to solve the problem, the rules for how<br />

the resources should be used to solve the problem, and when it is and is not appropriate<br />

to apply the pattern. Patterns are not code.<br />

The notation for applying patterns to a Class diagram is an oval collaboration icon<br />

with the pattern name. Dashed lines connect the pattern to the participating<br />

classes. The role names are placed at the ends of the dashed lines near the class<br />

that plays the role.<br />

QUIZ YOURSELF<br />

1. How would you use multiplicity to say that a Shipment must contain at least<br />

one Product but can contain as many Products as you like (See “Modeling the<br />

Inventory Control System for the Case Study.”)<br />

2. What notation would you use to indicate that there are two different types of<br />

Shipments (See “Modeling the Inventory Control System for the Case Study.”)<br />

3. What is a pattern (See “Understanding <strong>UML</strong> Notation for Design Patterns.”)<br />

4. What is the notation for a pattern (See “Understanding <strong>UML</strong> Notation for<br />

Design Patterns.”)<br />

5. How do you indicate the way in which a class participates in a pattern<br />

(See “Understanding <strong>UML</strong> Notation for Design Patterns.”)

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

Saved successfully!

Ooh no, something went wrong!