Page 139 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 139

Unit 11: Domain Analysis




                                                                                                Notes


             Notes Inheritance can be added by generalizing existing classes into a superclass or by
            specialising a class into subclasses (based on taxonomic relations).


          Bottom-up Generalization

          It is done by generalizing common aspect of existing classes into superclasses.
               Discover inheritance from bottom-up searching for classes with similar attributes,
               association & operation
               Define a super class to share a common feature.


                 Example: Remote Transaction & CashierTransaction are similar except initiation so they
          can be generalized by Transaction

          Top-down Specialization

          It is done by refining existing classes into specialized subclasses.
          Look for noun phrases composed of various adjectives on class name



                 Example: Fixed menu, pop-up menu, sliding menu
          Multiple Inheritance

          Use it to increase sharing but only if necessary because it increases both conceptual and
          implementation complexity

          Similar Association

          When same association name appears more than once with same meaning, generalize it.



              Task       Compare and contrast bottom-up generalization and top-down
                         specialization.


          Self Assessment

          Fill in the blanks:
          1.   Names that describes individual objects are ........................

          2.   A class that can be derived from other class is a ........................
          3.   ........................ describe structural property, not an event for object.
          4.   If independent existence of element is important than value, it is considered as an
               ........................






                                           LOVELY PROFESSIONAL UNIVERSITY                                   133
   134   135   136   137   138   139   140   141   142   143   144