Sunday, February 8, 2009

SCEA1.5 - UML

UML Terms:
Dependency: a change in one element can affect the semantics of another element.
Represented by: dashed line with arrow

Association: represents set of connections between objects
Represented by: solid line with arrow or without arrow may have multiplicity

Aggregation: represents the relationship between whole and the part
Represented by: solid line with open diamond arrowdiamond side one is whole

Composition: whole part relationship but its a stronder form of aggregation
Represented by: solid line with filled diamond, diamond side is part

Generalization:is parent and child relationship
Represented by: solid line with triangular open arrow, extends keyword

Realization: interface and implemenation class
Represented by: dashed arrow with triangular open arrow, implements keyword

Include relationship in usecase - that the other use case can reuse the coommon factored out use case.

Difference between Aggregation & Composition:
Aggregation defines a part of relationship but both objects can exist independently. But with composite aggregation if one part is removed then the other part will be removed. Think of a plane the wings have a composite aggregation relationship with the body of the plane.