Page 57 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 57

Anil Sharma, Lovely Professional University
                                                                                Unit 5: Advanced Class Modelling – II



                       Unit 5: Advanced Class Modelling – II                                    Notes


             CONTENTS
             Objectives

             Introduction
             5.1  Abstract Classes
             5.2  Constraints

             5.3  Derived Data
             5.4  Packages
                 5.4.1   Logical Horizon
             5.5  Summary

             5.6  Keywords
             5.7  Review Questions

             5.8  Further Readings
          Objectives


          After studying this unit, you will be able to:
               Explain the concept of Abstract Classes
               Discuss Constraints

               Discuss the concept of Derived Data
               Explain Packages

          Introduction

          In the previous unit, we have discussed advanced object and class concepts, concept of association
          ends, N-ary associations, concept of aggregation, and different types of aggregation. In this unit,
          we will discuss some other advanced aspects of object modeling which are required to model
          complex and large applications. We will discuss the concept of abstract classes, constraints,
          derived data, and packages. In packages, we will discuss the concept of logical horizon and
          various examples of packages.

          5.1 Abstract Classes

          An abstract class is a class that has no direct instances. The descendant classes can also be abstract,
          but the generalization hierarchy must ultimately terminate in subclasses with direct instances.


                 Example: In Figure 5.1 Person is an abstract class but the subclasses Manager and
          Individual Contributor are concrete.








                                           LOVELY PROFESSIONAL UNIVERSITY                                   51
   52   53   54   55   56   57   58   59   60   61   62