Page 36 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 36
Object Oriented Analysis and Design
Notes Table 3.1: Multiplicity Indicators
Indicator Meaning
0..1 Zero or one
1 One only
0..* Zero or more
1..* One or more
n Only n (where n> 1)
0..n Zero to n (where n> 1)
1..n One to n (where n> 1)
In associations, generally movement is in both the directions of the relationships but if you
want to be specific in any particular direction, you have to mark it by an arrow.
Example: An example of multiplicity is shown in Figure 3.7.
Figure 3.7: Association and Movement
Multiplicity
Student 1 0...* Program
Movement
Self Assessment
Fill in the blanks:
6. A ..................... is a physical or conceptual connection between objects.
7. A link is also defined as an instance of an .....................
8. If a ..................... association is decomposed in some other association, some information
will be lost.
9. ..................... in an association specifies how many objects participate in a relationship.
3.3 Generalization and Inheritance
In this section, we will discuss the concepts of generalization, inheritance, and their uses in
OOM.
3.3.1 Generalization
Generalization and inheritance are powerful abstractions for sharing the structure and/or
behaviour of one or more classes.
30 LOVELY PROFESSIONAL UNIVERSITY