Basic Modelling Concepts: Difference between revisions
Jump to navigation
Jump to search
Line 52: | Line 52: | ||
{| class="wikitableharm" width="1250" | {| class="wikitableharm" width="1250" | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
! width="625" | [[File:ClassDiagram-Composition.png | ! width="625" | [[File:ClassDiagram-Composition.png|thumb|left|450px|1-directional composition]] | ||
|- | |||
|- | |- | ||
! Description | ! Description | ||
|- | |- | ||
| A "owns" B = Composition : B has no meaning or purpose in the system without A. | | A "owns" B = Composition : B has no meaning or purpose in the system without A. The arrowhead on the other end of the relationship denotes that the relationship is navigable in only one direction. That is, Point does not know about Circle. | ||
<br>Example: | <br>Example: | ||
<br>Each instance of type ''Circle'' contains instance(s) of type ''Point''. | |||
<br>A Text Editor owns a Buffer (composition). A Text Editor uses a File (aggregation). | <br>A Text Editor owns a Buffer (composition). A Text Editor uses a File (aggregation). | ||
<br>The university has faculties which exists on its departments (composition). Departments uses employees/members (aggregation). | <br>The university has faculties which exists on its departments (composition). Departments uses employees/members (aggregation). | ||
|} | |||
== See also == | == See also == |
Revision as of 16:58, 18 January 2015
Modelling tools have their own interpretation of how diagrams, icons are used. This webpage tries to give some clues on how this implementation are made.
Diagram Elements | Sterotypes |
---|---|
![]() ![]() |
![]() ![]() |
Object Orientation Basic Elements
Basic OO Elements:
Association
https://upload.wikimedia.org/wikipedia/en/f/f5/BidirectionalAssociation.png | https://upload.wikimedia.org/wikipedia/en/0/05/UnidirectionalAssociation.png |
---|---|
A bidirectional association | Unless otherwise specified, navigation across an association is bidirectional, although it may be limited to just one direction by adorning some end with an arrowhead pointing to the direction of traversal. |
Description | |
Association defines a relationship between classes of objects that allows one object instance to cause another to perform an action on its behalf. |
Aggregation
https://upload.wikimedia.org/wikipedia/commons/d/d0/Aggregation-Composition3.png |
---|
A bidirectional association |
Description |
Association defines a relationship between classes of objects that allows one object instance to cause another to perform an action on its behalf. A "uses" B = Aggregation : B exists independently (conceptually) from A.
|
Composition
See also
http://agilemodeling.com/images/style/classDiagramAnalysisVsDesign.gif top
- Agile Modeling, Class Diagrams Guidelines. See example above.