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>What Are Roles?What Are Roles?• The “face” that a class plays in theassociationCourseOfferinginstructorProfessorDepartmentDepartment HeadRole NameCoursepreRequisites<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 47Each end of an association has a role in relationship to the class on the other end ofthe association. The role specifies the face that a class presents on each side of theassociation. A role must have a name, <strong>and</strong> the role names on opposite sides of theassociation must be unique. The role name should be a noun indicating theassociated object's role in relation to the associating object.The use of association names <strong>and</strong> role names is mutually exclusive: one would notuse both an association name <strong>and</strong> a role name. For each association, decide whichconveys more information.The role name is placed next to the end of the association line of the class itdescribes.In the case of self-associations, role names are essential to distinguish the purpose forthe association.In the above example, the Professor participates in two separate associationrelationships, playing a different role in each.6 - 47

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

Saved successfully!

Ooh no, something went wrong!