<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=OCUP_Class_Diagram</id>
	<title>OCUP Class Diagram - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=OCUP_Class_Diagram"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=OCUP_Class_Diagram&amp;action=history"/>
	<updated>2026-04-21T08:50:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=OCUP_Class_Diagram&amp;diff=12877&amp;oldid=prev</id>
		<title>Filip Stachecki: /* Composition⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=OCUP_Class_Diagram&amp;diff=12877&amp;oldid=prev"/>
		<updated>2013-10-24T07:40:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Composition⌘&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Private]]&lt;br /&gt;
[[Category:OCUP]]&lt;br /&gt;
==Class Basics⌘==&lt;br /&gt;
Described in the metamodel Kernel package Classes::Kernel.&lt;br /&gt;
&lt;br /&gt;
Most elements of the root model are abstract and are not represented in UML diagrams.&lt;br /&gt;
====Element⌘====&lt;br /&gt;
[[File:UMLElement.png]]&lt;br /&gt;
&lt;br /&gt;
Metaclass &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Element&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*An element is a constituent of a model.&lt;br /&gt;
*All elements are subclasses of Element&lt;br /&gt;
*Element can own other elements&lt;br /&gt;
*No notation for Element - it is &amp;#039;&amp;#039;abstract&amp;#039;&amp;#039;&lt;br /&gt;
====Relationship ⌘====&lt;br /&gt;
[[File:UMLRelationship.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Relationship&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; class&lt;br /&gt;
*Used to interconnect elements&lt;br /&gt;
*No notation for Relationship as it is &amp;#039;&amp;#039;abstract&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
====Directed Relationship ⌘====&lt;br /&gt;
[[File:DirectedRelationship.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;DirectedRelationship&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; class&lt;br /&gt;
*a specialization of a relationship&lt;br /&gt;
*source elements want something - a &amp;#039;&amp;#039;&amp;#039;client&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*target element offers something - a &amp;#039;&amp;#039;&amp;#039;supplier&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Comment⌘===&lt;br /&gt;
[[File:UMLComment.png]]&lt;br /&gt;
* a textual annotation that can be attached to an element&lt;br /&gt;
* may contain information that is useful to a modeler&lt;br /&gt;
* can be attached to more than one element&lt;br /&gt;
&lt;br /&gt;
===Constraint⌘===&lt;br /&gt;
[[File:Constraint.png]]&lt;br /&gt;
* condition or restriction related to an element &lt;br /&gt;
* it must always be true&lt;br /&gt;
* can be in formal (OCL) or human language&lt;br /&gt;
* syntax: &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; [name :] boolean expression &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Classifier⌘===&lt;br /&gt;
* an abstract base class&lt;br /&gt;
* describes a set of instances that have features in common&lt;br /&gt;
* Examples of Classifiers:&lt;br /&gt;
** Use Case&lt;br /&gt;
** Class&lt;br /&gt;
===Feature⌘===&lt;br /&gt;
[[File:Feature.png]]&lt;br /&gt;
* declares a behavioral or structural characteristic of instances of classifiers&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;structural feature&amp;#039;&amp;#039;&amp;#039; describes a structure of an instance of a classifier (e.g. property)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;behavioral feature&amp;#039;&amp;#039;&amp;#039; specifies an aspect of the behavior of classifier&amp;#039;s instances (e.g. operation)&lt;br /&gt;
====Property⌘====&lt;br /&gt;
* a special structural feature that if it belongs to a class, is an attribute&lt;br /&gt;
* represents a declared state of one or more instances&lt;br /&gt;
&lt;br /&gt;
====Operation⌘====&lt;br /&gt;
* a behavioral feature of a classifier, which specifies name, type, parameters, and constraints&lt;br /&gt;
* can have preconditions and postconditions&lt;br /&gt;
* can have a type (the type of the return parameter)&lt;br /&gt;
* example:&lt;br /&gt;
 + createWindow (location: Coordinates): Window&lt;br /&gt;
&lt;br /&gt;
===Class⌘===&lt;br /&gt;
[[File:UMLClass.png]]&lt;br /&gt;
* describes a set of objects that share the same specifications of features (attributes and operations)&lt;br /&gt;
* is a special classifier&lt;br /&gt;
* an object is an instance of a class&lt;br /&gt;
&lt;br /&gt;
===Generalization⌘===&lt;br /&gt;
[[File:GeneralizationExample.png]]&lt;br /&gt;
* relationship between a more general classifier and a more specific classifier&lt;br /&gt;
* each instance of the specific classifier is also an indirect instance of the general classifier&lt;br /&gt;
* the specific classifier inherits the features of the more general classifier&lt;br /&gt;
====Generalization Example⌘====&lt;br /&gt;
[[File:GenExample.png]]&lt;br /&gt;
&lt;br /&gt;
===Association⌘===&lt;br /&gt;
[[File:AssociationWithMarks.png]]&lt;br /&gt;
* specifies a relationship between instances&lt;br /&gt;
* describes a set of tuples whose values refer to typed instances&lt;br /&gt;
* declares that there can be links between instances of the associated types&lt;br /&gt;
&lt;br /&gt;
====Multiplicity⌘====&lt;br /&gt;
* specifies how many objects of the opposite class an object can be associated with&lt;br /&gt;
* is a range of the minimum and maximum values&lt;br /&gt;
* syntax: &amp;#039;&amp;#039;&amp;#039;number&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;min..max&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Multiplicity !! Notation&lt;br /&gt;
|-&lt;br /&gt;
| zero || &amp;#039;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;0..0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| exactly one || &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| zero or one || &amp;#039;&amp;#039;&amp;#039;0..1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| zero or more || &amp;#039;&amp;#039;&amp;#039;0..*&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| one or more || &amp;#039;&amp;#039;&amp;#039;1..*&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Multiplicity example⌘====&lt;br /&gt;
[[File:MultiplicityExample.png]]&lt;br /&gt;
&lt;br /&gt;
====Multiplicity - order and uniqueness⌘====&lt;br /&gt;
* Multiplicity defines a specification of order and uniqueness of the collection elements.&lt;br /&gt;
* This option can specify whether the values should be &amp;#039;&amp;#039;&amp;#039;unique&amp;#039;&amp;#039;&amp;#039; and/or &amp;#039;&amp;#039;&amp;#039;ordered&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;ordered&amp;#039;&amp;#039;&amp;#039;: the collection of values is sequentially ordered (default: not ordered)&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;unique&amp;#039;&amp;#039;&amp;#039;: each value in the collection of values must be unique (default: is unique)&lt;br /&gt;
&lt;br /&gt;
====Property = End or Attribute⌘====&lt;br /&gt;
[[File:Attribute.png]]&lt;br /&gt;
&lt;br /&gt;
====Navigability⌘====&lt;br /&gt;
[[File:Navigability.png]]&lt;br /&gt;
* specifies whether one object can be accessed directly from another&lt;br /&gt;
&lt;br /&gt;
====Aggregation⌘====&lt;br /&gt;
[[File:Aggregation.png]]&lt;br /&gt;
* shows how something (&amp;#039;&amp;#039;&amp;#039;whole&amp;#039;&amp;#039;&amp;#039;) is composed of &amp;#039;&amp;#039;&amp;#039;parts&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* parts can exist separately - can be &amp;#039;&amp;#039;&amp;#039;shared&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* precise semantics of aggregation varies by application area and modeler :)&lt;br /&gt;
&lt;br /&gt;
====Composition⌘====&lt;br /&gt;
[[File:UMLComposition.png]]&lt;br /&gt;
* a strict form of aggregation&lt;br /&gt;
* the whole is the owner of its parts&lt;br /&gt;
* parts &amp;#039;&amp;#039;&amp;#039;can not&amp;#039;&amp;#039;&amp;#039; be shared&lt;br /&gt;
* the existence of its parts depends on the whole&lt;br /&gt;
&lt;br /&gt;
====Aggregation / Composition Example⌘====&lt;br /&gt;
[[File:AggregationBoatCarExample.png]]&lt;br /&gt;
&lt;br /&gt;
====N-ary association⌘====&lt;br /&gt;
[[File:TernaryAssociation.png]]&lt;br /&gt;
* if an association has more than two end points (here: ternary association)&lt;br /&gt;
* Notation: a rhombus is used as a connection point&lt;br /&gt;
&lt;br /&gt;
===Dependency ⌘===&lt;br /&gt;
[[File:Dependency.png]]&lt;br /&gt;
* a relationship that signifies that a model element(s) requires other model element(s) for their &amp;#039;&amp;#039;&amp;#039;specification&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;implementation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* the complete semantics of the depending elements is dependent on the definition of the supplier element(s)&lt;br /&gt;
* the modification of the &amp;#039;&amp;#039;&amp;#039;supplier&amp;#039;&amp;#039;&amp;#039; may impact the &amp;#039;&amp;#039;&amp;#039;client&amp;#039;&amp;#039;&amp;#039; model elements&lt;br /&gt;
* the semantics of the &amp;#039;&amp;#039;&amp;#039;client&amp;#039;&amp;#039;&amp;#039; is not complete without the &amp;#039;&amp;#039;&amp;#039;supplier&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* the type of dependency can be specified by using a keyword or stereotype&lt;br /&gt;
&lt;br /&gt;
====Abstraction⌘====&lt;br /&gt;
[[File:Abstraction.png]]&lt;br /&gt;
* a special dependency relationship between model elements that represent the &amp;#039;&amp;#039;&amp;#039;same concept&amp;#039;&amp;#039;&amp;#039; at &amp;#039;&amp;#039;&amp;#039;different levels&amp;#039;&amp;#039;&amp;#039; of abstraction or from &amp;#039;&amp;#039;&amp;#039;different viewpoints&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
====Permit⌘====&lt;br /&gt;
[[File:Permit.png]]&lt;br /&gt;
* the dependent element is permitted to use &amp;#039;&amp;#039;&amp;#039;private&amp;#039;&amp;#039;&amp;#039; content of this independent element&lt;br /&gt;
&lt;br /&gt;
====Substitute⌘====&lt;br /&gt;
[[File:Substitute.png]]&lt;br /&gt;
* instances of the independent element can be substituted by instances of the dependent element at runtime&lt;br /&gt;
* runtime substitutability that is not based on specialization&lt;br /&gt;
&lt;br /&gt;
====Usage⌘====&lt;br /&gt;
[[File:UsageRelationship.png]]&lt;br /&gt;
* a relationship in which one element requires another element(s) for its full &amp;#039;&amp;#039;&amp;#039;implementation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* is limited to the &amp;#039;&amp;#039;&amp;#039;implementation&amp;#039;&amp;#039;&amp;#039; and it doesn’t apply to the specification (dependency do apply)&lt;br /&gt;
&lt;br /&gt;
===Interface⌘===&lt;br /&gt;
* is a kind of classifier that represents a &amp;#039;&amp;#039;&amp;#039;declaration&amp;#039;&amp;#039;&amp;#039; of a set of coherent public features and obligations&lt;br /&gt;
* an interface specifies a &amp;#039;&amp;#039;&amp;#039;contract&amp;#039;&amp;#039;&amp;#039;; any instance of a classifier that realizes the interface must satisfy that contract&lt;br /&gt;
* it is just declaration - so it is &amp;#039;&amp;#039;&amp;#039;not instantiable&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Provided Interface⌘====&lt;br /&gt;
[[File:ProvidedInterface.png]]&lt;br /&gt;
* an interface realized by a classifier is its &amp;#039;&amp;#039;&amp;#039;provided interface&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* represent the obligations that instances of that classifier have to satisfy&lt;br /&gt;
&lt;br /&gt;
====Required Interface⌘====&lt;br /&gt;
[[File:RequiredInterface.png]]&lt;br /&gt;
* specify services that a classifier &amp;#039;&amp;#039;&amp;#039;needs&amp;#039;&amp;#039;&amp;#039; in order to perform its function&lt;br /&gt;
====Interface Example⌘====&lt;br /&gt;
[[File:InterfaceExample.png]]&lt;br /&gt;
&lt;br /&gt;
===Named Element⌘===&lt;br /&gt;
* represents an element that &amp;#039;&amp;#039;&amp;#039;may&amp;#039;&amp;#039;&amp;#039; have a name and a visibility&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Visibility Kind !! Notation&lt;br /&gt;
|-&lt;br /&gt;
| public || &amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| private || &amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| protected || &amp;#039;&amp;#039;&amp;#039;#&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| package || &amp;#039;&amp;#039;&amp;#039;~&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Namespace⌘===&lt;br /&gt;
&lt;br /&gt;
*named element that can own other named elements &lt;br /&gt;
*each named element may be owned by at most one namespace&lt;br /&gt;
* provides a container for named elements&lt;br /&gt;
* all the members of a &amp;#039;&amp;#039;&amp;#039;namespace&amp;#039;&amp;#039;&amp;#039; are distinguishable within it&lt;br /&gt;
&lt;br /&gt;
===Package⌘===&lt;br /&gt;
[[File:UMLPackage.png]]&lt;br /&gt;
* used to group elements, and provides a namespace for the grouped elements&lt;br /&gt;
* qualified name:&lt;br /&gt;
 package name::element name&lt;br /&gt;
&lt;br /&gt;
===Package Import, Access⌘===&lt;br /&gt;
[[File:PackageImportAccess.png]]&lt;br /&gt;
&lt;br /&gt;
A package import is defined as a directed relationship that identifies a package whose members are to be imported by a&lt;br /&gt;
namespace.&lt;br /&gt;
&lt;br /&gt;
Two types:&lt;br /&gt;
* «import» for a &amp;#039;&amp;#039;&amp;#039;public&amp;#039;&amp;#039;&amp;#039; package import&lt;br /&gt;
** transitive: if A imports B and B imports C then A indirectly imports C&lt;br /&gt;
* «access» for a &amp;#039;&amp;#039;&amp;#039;private&amp;#039;&amp;#039;&amp;#039; package import&lt;br /&gt;
** intransitive&lt;br /&gt;
&lt;br /&gt;
====Package Import Example⌘====&lt;br /&gt;
[[File:PackageImportExample.png]]&lt;br /&gt;
* elements in Types are imported to ShoppingCart, and then further imported to WebShop&lt;br /&gt;
* elements of Auxiliary are only accessed from ShoppingCart, and cannot be referenced from WebShop&lt;br /&gt;
&lt;br /&gt;
===Instance ⌘===&lt;br /&gt;
[[File:InstanceSpecification.png]]&lt;br /&gt;
* is a concrete instance in the modeled system&lt;br /&gt;
* instance = object&lt;/div&gt;</summary>
		<author><name>Filip Stachecki</name></author>
	</entry>
</feed>