13.07.2015 Views

Object-Oriented Software Development with UML - UNU-IIST ...

Object-Oriented Software Development with UML - UNU-IIST ...

Object-Oriented Software Development with UML - UNU-IIST ...

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.

Conceptual Model – Associations 55*Tzero or more; "many’’5Texactly five1..*Tone or more; ‘‘at least one’’3,5,8Texactly three, five or eight1..40Tone to fortyPersonPersonOne person mayhave any numberof jobs or no job.Works-for**Works-forEach person worksfor one and only onecompnay*1CompnayCompnayFigure 5.6: Multiplicity valuesRoles of associationsEach end of an association 1 is called a role of the association, which may has a role name. Naming a rolein a conceptual model is sometimes useful. For example, the role names boss and worker distinguish twoemployees who work for a company and participate in the Manages association (See Figure 5.8).When we come up to the design and implementation of the system, roles provide a way of viewing anassociation as a traversal from one object to a set of associated objects.The purpose of an association and a link between two objects <strong>Object</strong>s may have many sorts of relationship,and thus classes (or concepts) may have all sorts of associations in a problem domain. Whetheran association is useful or not depends on whether it fulfill the following purpose.of the classes.=An association between two classes is to provide physical or conceptual connections between objects=Only objects that are associated <strong>with</strong> each other can collaborate <strong>with</strong> each other through the links.Booch describes the role of a link between objects as follows:“A link denotes the specific association through which one object (the client) applies the servicesof another object (the supplier), or through which one object may navigate to another”.1 In this course, we are mainly concerned <strong>with</strong> binary associations which relate two classes. In general, an association may beternary or even higher order which relate three or more classes.Report No. 259, July 2002<strong>UNU</strong>/<strong>IIST</strong>, P.O. Box 3058, Macau

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

Saved successfully!

Ooh no, something went wrong!