Uml Class Diagram
Uml Class Diagram
Uml Class Diagram
2. Interface
1
August 22, 2015 | 3:28:23 PM
Symbol
3. Association
4. Multiplicity
0 exactly zero
1 exactly one
1..* one or more
0..* zero or more
n many
5. Generalization
6. Aggregation
7. Composition
2
August 22, 2015 | 3:28:23 PM
It is optional
Ex:
Student
2. SOFTWARE VIEW
It is optional
Ex:
Student
+name
+id
+study()
+play()
3. IMPLEMENTATION VIEW
It is optional
3
August 22, 2015 | 3:28:23 PM
Ex:
Student
+name: String
+id: int
+study():int
+play():void
GENERALIZATION
Symbol:
I. GENERALIZATION EXAMPLES
:
Ex: 1 :
4
August 22, 2015 | 3:28:23 PM
NOTE:
Here C is a super class and C++, Java and C#.NET is a sub classes of super
class
All sub classes (C++, Java and C#.NET) are derived from a single class
called C
Ex: 2
NOTE:
Here C is a super class and Bike, Car and Bus is a sub classes of super class
All sub classes (Bike, Car and Bus) are derived from a single class called
Vehicle
5
August 22, 2015 | 3:28:23 PM
:
Ex:4 [COMPOSITION]
:
NOTE:
If Folder(Container Object) is detroyed then Files (contained object) will
be deleted
6
August 22, 2015 | 3:28:23 PM
NOTE:
NOTE:
NOTE:
AGGREGATION vs COMPOSITION
:
:
Ex: 1 [AGGREGATION vs COMPOSITION]
NOTE:
COMPOSITION
If the Mobile(Container Object) is destroyed/deleted, then its
contents(Contained Object: Message, Camera, Softwares) will be
destroyed beacause of strong-life cycle dependancy
AGGREGATION
If the Mobile(Container Object) is destroyed/deleted, then its
contents(Contained Object: Battery, Simcard, Memorycard) will
not be destroyed
8
August 22, 2015 | 3:28:23 PM
NOTE:
COMPOSITION
9
August 22, 2015 | 3:28:23 PM
:
:
:
:
:
:
:
:
10
August 22, 2015 | 3:28:23 PM
2. SEARCH ENGINE:
:
:
:
:
:
:
:
:
:
:
:
:
11
August 22, 2015 | 3:28:23 PM
:
:
:
:
:
:
:
:
12
August 22, 2015 | 3:28:23 PM
:
:
:
:
:
:
:
:
13