In class diagrams, should classes that implement the interface repeat the names of the methods?

I create some UML diagrams, and I have a large number of classes that implement the interface.

Do these classes also need to list interface methods? That sounds pretty trivial, but will make the chart a lot easier if they don't.

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 method 1, method2 and method3 - can this be omitted?

+6
source share
1 answer

I often refer to the Agile Modeling Class Diagram Guides . You will find the answer to this question in section 3 "Interfaces".

Quick answer: they can be ignored.

+8
source

Source: https://habr.com/ru/post/944700/


All Articles