Relations between Class Diagrams - UML Harish Alwala
Terminology Class Diagram Aggregation Association Generalization Realization Composition
Class Diagram A Class defines the attributes and the methods of a set of objects. All objects of this class (instances of this class) share the same behaviour, and have the same set of attributes (each object has its own set). Stereotype for Attributes & Operations private - public + protected # Class Dependency Dependency is a form of association that specifies a dependency relationship between two classes.  An arrowhead can be used to indicate an asymmetric dependency. Symmetric dependency doesn’t have arrowhead
Generalization-  Inheritance a  Generalisation  association between two classes puts them in a hierarchy representing the concept of inheritance of a derived class from a base class
Association Associations can have a role that specifies the purpose of the association and can be uni- or bidirectional (indicates if the two objects participating in the relationship can send messages to the other) An association usually means that you have a sentence that describes a relation between two (or more) classes.  Examples of associations: Node class contains Attribute classes.  Driver class drives Car class. Transaction class modifies Table classes.  Manager class starts Machine class. Page class contains Widget classes.
Composite Aggregation Composition  is a form of symmetric association that specifies a whole-part relationship between the composition (whole) class and a subordinate (part) class in which removing the whole also removes the parts. For example:  In relational databases, a cascading delete is a good example of a composition relationship. Window contains title, Table row and columns A whole-part relationship between the Person (whole) class and the Head (part) class. In this example, removing the person also removes the head and removing the head effectively destroys the person - the person and head must exist together in the context of a living person
(Shared)Aggregation Aggregation  is a form of asymmetric association that specifies a whole-part relationship between the aggregate (whole) class and a subordinate (part) class. The shared aggregation indicates that some classifier (process or class) cannot be performed/completed without another classifier. In the example illustration below, there is a whole-part relationship between the Car (whole) class and the Engine (part) class. In English, this would be stated as  Engine is a part of Car Book reading is not possible without a book but the book can be used in two different reading processes. Another example: database driven web form consists of fields, actions and pooled data connection and the connection can be used by another form/control
Thank You Thank You

Relations Class Diagram

  • 1.
    Relations between ClassDiagrams - UML Harish Alwala
  • 2.
    Terminology Class DiagramAggregation Association Generalization Realization Composition
  • 3.
    Class Diagram AClass defines the attributes and the methods of a set of objects. All objects of this class (instances of this class) share the same behaviour, and have the same set of attributes (each object has its own set). Stereotype for Attributes & Operations private - public + protected # Class Dependency Dependency is a form of association that specifies a dependency relationship between two classes. An arrowhead can be used to indicate an asymmetric dependency. Symmetric dependency doesn’t have arrowhead
  • 4.
    Generalization- Inheritancea Generalisation association between two classes puts them in a hierarchy representing the concept of inheritance of a derived class from a base class
  • 5.
    Association Associations canhave a role that specifies the purpose of the association and can be uni- or bidirectional (indicates if the two objects participating in the relationship can send messages to the other) An association usually means that you have a sentence that describes a relation between two (or more) classes. Examples of associations: Node class contains Attribute classes. Driver class drives Car class. Transaction class modifies Table classes. Manager class starts Machine class. Page class contains Widget classes.
  • 6.
    Composite Aggregation Composition is a form of symmetric association that specifies a whole-part relationship between the composition (whole) class and a subordinate (part) class in which removing the whole also removes the parts. For example: In relational databases, a cascading delete is a good example of a composition relationship. Window contains title, Table row and columns A whole-part relationship between the Person (whole) class and the Head (part) class. In this example, removing the person also removes the head and removing the head effectively destroys the person - the person and head must exist together in the context of a living person
  • 7.
    (Shared)Aggregation Aggregation is a form of asymmetric association that specifies a whole-part relationship between the aggregate (whole) class and a subordinate (part) class. The shared aggregation indicates that some classifier (process or class) cannot be performed/completed without another classifier. In the example illustration below, there is a whole-part relationship between the Car (whole) class and the Engine (part) class. In English, this would be stated as Engine is a part of Car Book reading is not possible without a book but the book can be used in two different reading processes. Another example: database driven web form consists of fields, actions and pooled data connection and the connection can be used by another form/control
  • 8.