12.07.2015 Views

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

Module 6 - Use-Case <strong>Analysis</strong>Review: What Is an Association?Review: What Is an Association?•The semantic relationship between two ormore classifiers that specifies connectionsamong their instances• A structural relationship, specifying that objectsof one thing are connected to objects of anotherStudentScheduleCourse<strong>Mastering</strong> <strong>Object</strong> <strong>Oriented</strong> <strong>Analysis</strong> <strong>and</strong> <strong>Design</strong> <strong>with</strong> <strong>UML</strong>Copyright © 2003 Rational Software, all rights reserved 43Associations represent structural relationships between objects of different classes;they connect instances of two or more classes together for some duration.You can use associations to show that objects know about other objects. Sometimes,objects must hold references to each other to be able to interact; for example, tosend messages to each other. Thus, in some cases, associations may follow frominteraction patterns in Sequence diagrams or Collaboration diagrams.Most associations are simple (exist between exactly two classes), <strong>and</strong> are drawn assolid paths connecting pairs of class symbols. Ternary relationships are also possible.Sometimes a class has an association to itself. This does not necessarily mean that aninstance of that class has an association to itself; more often, it means that oneinstance of the class has associations to other instances of the same class.An association may have a name that is placed on, or adjacent to the associationpath. The name of the association should reflect the purpose of the relationship <strong>and</strong>be a verb phrase. The name of an association can be omitted, particularly if rolenames are used.Avoid names like "has" <strong>and</strong> "contains," as they add no information about what therelationships are between the classes.6 - 43

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

Saved successfully!

Ooh no, something went wrong!