Page 49 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 49

Unit 4: Advanced Class Modelling – I




          Do not confuse an enumeration domain with generalization. You should introduce generalization  Notes
          only when at least one subclass has significant attributes, operations, or associations that do not
          apply to the superclass. Do not introduce a generalization just because you have found an
          enumeration domain.




             Notes You can define a domain intensionally (by formula), extensionally (by explicitly
             listing occurrences), or in terms of another domain.




              Task       Make distinction between enumeration domain and structured domain.


          Self Assessment

          Fill in the blanks:
          1.   ........................ is the relationship between an object and its class.

          2.   A ....................... is an operation on a class rather than on instances of the class.
          3.   Attribute ....................... specifies the possible number of values for an attribute and is
               listed in brackets after the attribute name.

          4.   The collection of ....................... in a candidate key must be minimal.
          5.   An ....................... domain is a domain that has a finite set of values.

          4.2 Association Ends

          An association end is an endpoint of the line drawn for an association, and it connects the
          association to a class. An association end may include any of the following items to express
          more detail about how the class relates to the other class or classes in the association:

               Rolename
               Multiplicity specification
               Aggregation
               Qualifier

          4.2.1  Rolename

          A rolename is optional and indicates the role a class plays relative to the other classes in an
          association, how the other classes “see” the class or what “face” the class projects to the other
          classes in the relationship. A rolename is shown near the end of an association attached to a class.


                 Example: A work product is seen as input by a unit of work where the unit of work is
          seen as a consumer by the work product; a work product is seen as output by a unit of work
          where the unit of work is seen as a producer by the work product, as shown in Figure 4.8.








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