Friday, June 4, 2021

Binary association shape

Use a class diagram to make a general model of the structure of an application that specifies the system's classes, its attributes and methods, and the relationships between objects. 

Following are the shapes on the UML Class stencil.

Shape

Description

Class shape.

Describes a set of objects with similar structure, behavior, and relationships. The name of a class must be unique within its package. 

The class shape starts as a rectangle with three rows. The name of the class is in the top row. The other two rows are for methods or operations that the class may use.

Member shape

Describes an attribute or operation.

Separator shape

Used in a class shape to separate operations from attributes

Interface shape

Specifies the externally visible operations of a class, component, package, or other element without specifying internal structure.

Enumeration shape.

Describes a data type consisting of a set of named values. 

Package (expanded) shape.

Represents the basic organizing element of a UML model. It provides a namespace for the grouped elements. Each element belongs to only one package, and one package can be nested in another. 

Collapsed shape.

Represents a package in a process.

Note shape.

Used as a diagram comment that has no semantic influence on the model elements.

Inheritance shape.

Indicates that the source type inherits from the target type.

Interface Realization shape.

Indicates that the source type realizes the target interface. 

Association shape.

Represents a general relationship between instances of the classes.

Directed Association shape.

Represents a relationship that flows in only one direction between instances of the classes.

Aggregation shape.

Indicates that the object at the end with the diamond shape contains references to the object at the other end. If it contains that object exclusively, use a Composition shape instead. 

Dependency shape.

Indicates that the source type depends on the target type.

Composition shape.

Indicates that the source type has parts of the target type.

Following are some of the shapes on the UML Static Structure stencil.

Shape

Description

Association Class shape icon

Association class

Use an association class to add attributes, operations, and other properties to an association. Drawn as a class attached by a dashed line to an association, an association class is actually a single modeling element. The element has a single name that can appear on the association, in the class, or in both places. The association ends can have the usual adornments.

Binary Association shape icon

Binary Association class

A binary association  is a relationship between exactly two classes. You can add name and stereotype properties to a binary association. The point where a binary association connects to a class is called an association end or role. Properties related to a specific role, such as end name, multiplicity, aggregation, and navigability are attached to an association end.

Bound Element shape icon from the UML Static Structure stencil

Bound Element

In a static structure diagram, a bound element  is a use of a parameterized class, or template, in which the parameters from the parameterized class are bound to actual values. Because a bound element is fully specified by the parameterized class, you can't declare new attributes or operations. You can indicate the relationship between a bound element and its parameterized class by the way you name the bound element or by using a binding dependency to connect the bound element with the parameterized class.

Composition shape icon

Composition

A composition is a form of aggregation that indicates that a part may belong to only one whole and that the lifetime of the whole determines the lifetime of the part.

A composition is indicated with a solid filled diamond adornment on one of the association ends, and can be thought of as a collaboration in which all of the participants are part of a single composite object.

Exception shape icon

Exception

An exception is a signal raised by behavioral features typically in case of execution faults. In the metamodel, Exception is derived from Signal.

UML Generalization shape icon

Generalization

In a static structure diagram, a generalization is a relationship between a specific element and a general element, such that the specific element is fully consistent with the general element and includes additional information (such as attributes and associations). For example, the classes Polygon, Ellipse, and Spline can all be specific elements of a more general abstract class element named Shape.

To indicate a generalization, use a solid line with a hollow arrow at the end pointing toward the more general element. You can add a discriminator text label to a generalization path.

N-ary Association Class shape icon

N-ary Association Class

Use an n-ary association class in a static structure diagram to add attributes, operations, and other properties to an association. Drawn as a class attached by a dashed line to an association, an association class is actually a single modeling element. The element has a single name that can appear on the association, in the class, or in both places. The association ends can have the usual adornments.

N-ary Association shape icon

N-ary Association

In a static structure diagram, an n-ary association is an association among three or more classes (a single class can appear more than once). Each instance of the association is an ordered set of values from the respective classes. No association end in an n-ary association can contain the aggregation marker. An n-ary association can be an association class with attributes, operations, and other properties.

N-ary Link

N-ary Link

An n-ary link is an instance of an association and represents references between objects. An n-ary link is a path between n objects. If the association name is shown, it is underlined to indicate an instance.

End names, aggregation, composition, navigability, and other adornments can be shown on the link ends or roles but, because links are instances, their ends do not show multiplicity. A link can also have a stereotype to indicate a particular kind of implementation.

For more information, see Work with links in UML static structure diagrams.

Refinement shape icon

Refinement

Refinement is a kind of dependency that indicates a historical or derivation relationship between two elements with a mapping between them. A description of the mapping can be attached to the dependency in a note. The notation for a refinement dependency is a dashed arrow labeled with the stereotype <<refines>>.

UML Subsystem shape icon

Subsystem

A subsystem is a package that contains the contents of the entire system or an entire model within the system. Dragging a Subsystem shape onto a drawing page automatically creates a new static structure diagram on a new drawing page. You can place elements that belong to the subsystem package onto the page to create a view.

Trace shape icon

Trace

Trace is a kind of dependency that indicates a historical relationship between two elements that represent the same concept at different semantic levels or from different points of view. The related elements abstract the same part of the system but in different models. The notation for a trace dependency is a dashed arrow labeled with the stereotype <<traces>>.

UML  Utility shape icon

Utility

In a static structure diagram, a utility is a programming convenience rather than a fundamental construct. Attributes and operations you define for a utility become global variables and procedures. The notation for a utility is a class with the stereotype <<utility>>.

UML Link shape icon

Link

A link is an instance of an association and represents references between objects. It can be binary, in which case it is a path between two objects, or reflexive, in which case it involves a loop with each end attached to the same object. If the association name is shown, it is underlined to indicate an instance.

End names, aggregation, composition, navigability, and other adornments can be shown on the link ends or roles, but because links are instances, their ends do not show multiplicity. A link can also have a stereotype to indicate a particular kind of implementation.

See Also

Create a UML class diagram

No comments:

Post a Comment