In class diagrams, should classes implementing an interface have the method names repeated?

Tim MB picture Tim MB · May 10, 2013 · Viewed 7.4k times · Source

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:

UML diagram showing a class implementing an interface with the interface's method names repeated in the class

Any implementation of MyInterface requires method1, method2 and method3 - so can these be left out?

Answer

Casper Thule Hansen picture Casper Thule Hansen · May 10, 2013

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.