UML knowledge

501 views

Published on

Before learning design pattern, you should know something about UML.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

UML knowledge

  1. 1. 1UML Knowledge Li-Wei Cheng
  2. 2. UML related knowledge - 12  Association  The most abstract way to describe relationship between classes  A kind of link between two classes or more  Any relationship between object of two classes
  3. 3. UML related knowledge - 23  Weak Association (Dependency)  If class A’s methods include parameter of Class B’s reference, or returns reference of Class B, it calls A depends on B.  Strong Association  If class A holds class B’s reference, it calls A have strong association with B.
  4. 4. UML related knowledge - 34  Aggregation (Association with part/whole relation)  A part of relationship between Class A (whole) and Class B (part)  Also called shared association  Doesn’t state in any way that Class A owns Class B nor that there’s a parent-child relationship between the two
  5. 5. UML related knowledge - 45  Composition (Association with strong life cycle relation)  A strong life cycle dependency between the two, meaning that when Class A is deleted then Class B is also deleted as result.  Also called not shared association.  Use more specific composition link instead of the aggregation link or association link.

×