Java – represents overloaded methods in UML
•
Java
I tried to create a UML diagram representing some java code
In class, I have an overloaded method
As far as I know, the UML diagram does not show the parameters of the method
How to represent method overloading in UML?
thank you.
Solution
In the subclass, you specify a method with the same signature as the method you want to override and add a comment {redefinites} to the method For example:
+doSomething(p:AThing):int{redefines}
This means that the dosomething () method overrides the methods in the superclass Yes, the parameters of the method are shown on the chart As in the example, P is a parameter of type athing
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码