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.

<strong>DEV475</strong> <strong>Mastering</strong> <strong>Object</strong>-<strong>Oriented</strong> <strong>Analysis</strong> <strong>and</strong> <strong>Design</strong> <strong>with</strong> <strong>UML</strong>What Is an Association?What Is an Association?• The semantic relationship between two ormore classifiers that specifies connectionsamong their instances• A structural relationship, specifying that objects of onething 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 38An association can be defined as:The semantic relationship between two or more classifiers that specifies connectionsamong their instances. In other words, an association is a structural relationship thatspecifies that objects (instances of classes) are connected to other objects.• The way that we show relationships between classes is through the use ofassociations. Associations are represented on class diagrams by a line connectingthe associating classes. Data may flow in either direction or in both directionsacross a link.• Most associations are simple. That is, they exist between exactly two classes.They are drawn as solid paths connecting pairs of class symbols. Ternaryrelationships are also possible.• Sometimes, a class has an association to itself. This does not always 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.• This example shows that a student object is related to a schedule object. Thecourse class demonstrates how a course object can be related to another courseobject.2 - 38

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

Saved successfully!

Ooh no, something went wrong!