I'm creating some UML diagrams, and I have a large number of classes implementing an interface.
Is it necessary for these classes to also list the methods of the interface? It sounds quite trivial but will make the diagram look much simpler if they do not.
Here is an image to show what I mean:
(source: yuml.me)
Any implementation of MyInterface requires method1, method2 and method3 - so can these be left out?
Class rectangle symbol that contains the keyword «interface». This notation is also called the internal or class view. Use the class shape when you need to model the details of the interface. Compartments in the class shape display information about the attributes, operations, and signal receptions of the interface.
In domain modeling class diagrams, an implements relationship represents a class that implements the operations in a Java™ interface. As the following figure illustrates, an implements relationship is displayed as a dashed line with an unfilled arrowhead.
Interface is represented by a circle as shown in the following figure. It has a name which is generally written below the circle. Interface is used to describe the functionality without implementation.
I often refer to Agile Modeling's class diagramming guidelines. You'll find your question answered in section 3, "Interfaces".
Quick answer: They can be left out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With