A specification describes the behavior or structure of something without determining how the behavior will be implemented. An implementation provides the details about how to implement behavior in an effectively computable way. The relationship between an element that specifies behavior and one that provides an
implementation is called realization. In general, there are many ways to realize a
specification. Similarly, an element can realize more than one specification.
Realization is therefore a many-to-many relationship among elements.of structure or implementation.
The meaning of realization is that the client element must support all the behavior of the supplier element but need not match its structure or implementation. A client classifier, for example, must support the operations of the supplier classifier, and it must support all state machines that specify external behavior of the supplier. But any attributes, associations, methods, or state machines of the supplier that specify implementation are irrelevant to the client. Note that the client does not actually inherit the operations from the supplier. It must declare them itself or
inherit them from an ancestor so that all the operations of the supplier are covered. In other words, the supplier in a realization indicates which operations must be present in the client, but the client is responsible for providing them. In the
most general sense of realization, the names of the operations need not match, only their total behavior.
Certain kinds of elements, such as interfaces and use cases, are intended for specifying behavior, and they contain no implementation information. Other
kinds of elements, such as classes, are intended for implementing behavior. They contain implementation information, but they can also be used in a more abstract way as specifiers. Usually, realization relates a specification element, such as a use
case or an interface, to an implementation element, such as a collaboration or a class. It is possible to use an implementation element, such as a class, for specification. It can be placed on the specification side of a realization relationship.
In this case, only the specification parts of the supplier class affect the client. The implementation parts are irrelevant for the realization relationship. More precisely, then, realization is a relationship between two elements in which the external behavior
specification parts of one constrain the implementation of the other. It might be thought of as inheritance of behavior specification without inheritance.