Uml - Class Diagrams
Uml - Class Diagrams
Uml - Class Diagrams
www.mahmoud-a.com
www.mahmoud-a.com
symbol
Class name Attributes list Methods list
Whole
part
super
sub
Rental Invoice
1..* 1 0..1
1
Checkout Screen DVD Movie VHS Movie Video Game
www.mahmoud-a.com
Simple Aggregation
Rental Invoice
1..* 1
Composition (Dependency)
0..1
Simple Association Checkout Screen
Generalization
DVD Movie
VHS Movie
Video Game
www.mahmoud-a.com
www.mahmoud-a.com
2. Think about a doctors office that has decided to create health care teams that include doctors, nurses, and administrative personnel. As patients enter the office, they are assigned to a health care team that cares for their needs during their visits.
www.mahmoud-a.com
catalogue
product
10
www.mahmoud-a.com
1. Each part object may belong to only one whole object at a time. 2. When the whole object is destroyed, its parts also are destroyed. 3. Whole object is responsible for the creation and destruction of the parts. In native c++ if your objects parts are pointer you need to destroy it using delete keyword, because there is no garbage collector! , unlike java, C# and visual basic.net .
11 www.mahmoud-a.com
room
2. A polygon made of point ,if a polygon is destroyed, Point will be destroyed with it.
12
www.mahmoud-a.com
4. Imagine such a system including a Generic Report class. A Generic Report is composed of four parts Header, Column, Body, and Footer. If a report object is destroyed the parts will be destroyed.
13
www.mahmoud-a.com
14
www.mahmoud-a.com
1. Systems Analysis & Design with UML, 2nd Edition. 2. The object primer agile model driven development with uml 2.
15
www.mahmoud-a.com