Relations Class Diagram

3,518 views

Published on

Describe various attributes that Serve the Relations between class diagrams in uml

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,518
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
116
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Relations Class Diagram

  1. 1. Relations between Class Diagrams - UML Harish Alwala
  2. 2. Terminology <ul><ul><li>Class Diagram </li></ul></ul><ul><ul><li>Aggregation </li></ul></ul><ul><ul><li>Association </li></ul></ul><ul><ul><li>Generalization </li></ul></ul><ul><ul><li>Realization </li></ul></ul><ul><ul><li>Composition </li></ul></ul>
  3. 3. 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
  4. 4. 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
  5. 5. 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.
  6. 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. 7. (Shared)Aggregation <ul><li>Aggregation is a form of asymmetric association that specifies a whole-part relationship between the aggregate (whole) class and a subordinate (part) class. </li></ul><ul><li>The shared aggregation indicates that some classifier (process or class) cannot be performed/completed without another classifier. </li></ul><ul><li>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 </li></ul><ul><li>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 </li></ul>
  8. 8. Thank You <ul><li>Thank You </li></ul>

×