Page 50 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 50

Object Oriented Analysis and Design




                    Notes
                                                           Figure 4.8: Binary Association  Ends















                                   Source: http://etutorials.org/Programming/Learning+uml/Part+II+Structural+Modeling/Chapter+3.+
                                   Class+and+Object+Diagrams/3.2+Associations+and+Links/

                                   4.2.2  Navigation

                                   Navigation is optional and indicates whether a class may be referenced from the other classes in
                                   an association. Navigation is shown as an arrow attached to an association end pointing toward
                                   the class in question. If no arrows are present, associations are assumed to be navigable in all
                                   directions, and all classes involved in the association may reference one another.


                                          Example: Given a worker, you can determine his work products and units of work.
                                   Thus, Figure 4.8 shows arrows pointing towards work product and units of work. Given a unit
                                   of work, you can determine its input and output work products; but given a work product, you
                                   are unable to identify which worker is responsible for it or which units of work reference it as
                                   input or output (as shown in Figure 4.8 by the lack of arrows pointing to the Worker class).

                                   4.2.3  Qualifiers

                                   A qualifier is an attribute of an association class that reduces the multiplicity across an association.



                                          Example: Figure 4.8 shows that multiplicity between work products and units of work
                                   is zero or more for both associations; that is, there may be many work products associated with
                                   a single unit of work and there may be many units of work associated with a single work
                                   product.
                                   Rather than simply say that there are “many” objects involved in the relationship, you can
                                   communicate a more finite number.
                                   You can reduce the multiplicity between work products and units of work by asking yourself
                                   what you need to know about a unit of work so that you can define a more specific multiplicity
                                   one that isn’t unbounded on the high-end. Likewise, you can ask yourself the same question
                                   about the association between work product and units of work. If you have a work product and
                                   the name of a unit of work, you can determine whether a relationship exists between the two;
                                   likewise, if you have a unit of work and the name of a work product, you can determine whether
                                   a relationship exists between those two. The trick is to document precisely what information is
                                   needed so you can identify the objects on the other end of the relationship. This is where the
                                   qualifier comes into play.
                                   Essentially, a qualifier is a piece of information used as an index to find the objects on the other
                                   end of an association. A qualifier is shown as a small rectangle attached to a class where an object



          44                                LOVELY PROFESSIONAL UNIVERSITY
   45   46   47   48   49   50   51   52   53   54   55