Deprecated Garbage Collections – Kenny Lee Chee Wei

A truckload of garbage by Kenny Lee Chee Wei

Archive for the ‘Software Design’ Category

UML Class Relationships

leave a comment »

Multiplicities

  • any number (0 or more): *
  • one or more: 1..*
  • zero or one: 0..1
  • exactly one: 1

Generalization
UML Class Diagram - Generalization

Interface
UML Class Diagram - Inheritance

Association(Aggregation, Composition)
UML Class Diagram - Association

Both are ways of designating or grouping items by relationship. In the case of composition, if the links that bind the objects are broken, then all objects are destroyed. In aggregation, it’s a looser grouping, and if the links are broken the original objects still exist.

“Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true. For example, a company owns various departments (e.g., sales), and each department has a number of employees. If the university closes, the departments will no longer exist, but the professors in those departments will continue to exist. Therefore, a Company can be seen as a composition of departments, whereas departments have an aggregation of employees. In addition, an Employee could work in more than one department, but a department could not be part of more than one company.”

Advertisements

Written by kennii

September 3, 2007 at 2:56 pm

Posted in Software Design, UML