Prev | Next |
Class Diagram
The Class diagram captures the logical structure of the system - the Classes - and things that make up the model. It is a static model, describing what exists and what attributes and behavior it has, rather than how something is done. On a Class diagram you can illustrate relationships between Classes and Interfaces using Generalizations, Aggregations and Associations, which are valuable in reflecting inheritance, composition or usage, and connections respectively.
You generate Class diagram elements and connectors from the 'Class' pages of the Diagram Toolbox.
Example Diagram
In this example Class diagram, there are two forms of the Aggregation relationship:
- The pale form indicates that the Class Account uses AddressBook, but does not necessarily contain AddressBook
- The dark Composite Aggregation form indicates ownership or containment by the target Classes (at the diamond end) of the source Classes
Class Diagram Element Toolbox Icons
Icon |
Description |
See also |
---|---|---|
A Class is a representation of a type of object that reflects the structure and behavior of such objects within the system. |
Class | |
An Interface is a specification of behavior (or contract) that implementers agree to meet. |
Interface | |
A Data Type is a specific kind of classifier, similar to a Class except that a Data Type cannot own sub Data Types, and instances of a Data Type are identified only by their value. |
Data Type | |
An Enumeration is a data type, whose instances can be any of a number of user-defined enumeration literals. |
Enumeration | |
A Primitive element identifies a predefined data type, without any relevant substructure (that is, it has no parts in the context of UML). |
Primitive | |
A Signal is a specification of Send request instances communicated between objects, typically in a Class or Package diagram. |
Signal | |
An n-Ary Association element is used to model complex relationships between three or more elements, typically in a Class or Object diagram. |
N-Ary Association |
Class Diagram Connector Toolbox Icons
Icon |
Description |
See also |
---|---|---|
An Association implies that two model elements have a relationship, usually implemented as an instance variable in one or both Classes. |
Association | |
A Generalization is used to indicate inheritance. |
Generalization | |
A Composition is used to depict an element that is made up of smaller components, typically in a Class or Package diagram. |
Composition | |
An Aggregation connector is a type of association that shows that an element contains or is composed of other elements. |
Aggregation | |
An Association Class is a UML construct that enables an Association to have attributes and operations (features). |
Association Class | |
A source object implements or Realizes its destination object. |
Realization | |
You create a Template Binding connector between a binding Class and a parameterized Class. |
Template Binding |
Class Diagram Composite Parts
Icon |
Description |
See also |
---|---|---|
Parts are run-time instances of Classes or Interfaces. |
Part | |
Ports define the interaction between a classifier and its environment. |
Port | |
The Expose Interface element is a graphical method of depicting the required or supplied interfaces of a Component, Class or Part, in a Class, Component or Composite Structure diagram. |
Expose Interface | |
An Assembly connector bridges a component's required interface (Component1) with the provided interface of another component (Component2), typically in a Component diagram. |
Assembly | |
Connectors illustrate communication links between Parts to fulfill the structure's purpose, typically in a Class or Composite Structure diagram. |
Connector | |
A Delegate connector defines the internal assembly of a component's external Ports and Interfaces, on a Class diagram or Component diagram. |
Delegate |
Class Diagram UML Standard Profile
The UML Standard Profile is a collection of stereotyped Classes, operations and relationships provided as modeling tools in compliance with the UML 2.5 Specification (Chapter 22, Standard Profile).
Some of these modeling elements are directly available through the 'UML Standard Profile' Toolbox page in the Class or Package Diagram Toolboxes; others can be applied as stereotypes on the base UML modeling object.