Interfaces and Realizations |
An interface is essentially a class with no implementation. It contains a list of public operations that can be implemented by other classes and has no attributes. The classes that implement the interface don't need to know anything about how the interface is implemented.
Suppose that you have several unrelated aggregate objects, each with a different structure. You might use an interface to provide a way to access the elements without exposing the underlying structure. In the example below, an interface called Sortable is used to accomplish this. "Sorter" doesn't need to know anything about the differences between ClientArray and PurchaseOrder.

Realization links are used in the example above to indicate that ClientArray and PurchaseOrder implement the operations in Sortable. Use the display field on the realization's property page to specify text that should appear next to the realization link on your diagram.
A lollipop interface is a shorthand syntax for a interface. It shows the interface name without displaying the operations.
Related Topics: