How to Display a Parameter in Class without Showing its Name?

How to Display a Parameter in Class without Showing its Name?Programming languages like C or C++ accepts nameless arguments in function declaration. You may write something like void myFunction(double){…} to declare a function that accepts a double as argument. In modeling level, you can represent this kind of function by not showing the parameter name in an operation. This article shows you how to do this.


Typically, an operation in a UML class is displayed in this pattern: ${oper-name} ([${parameter-name} : ${parameter-type}]*) : ${return-type}. When you want not to show the name of a parameter, name the parameter by using unnamed_ as prefix. Parameter names with unnamed_ as prefix won’t get rendered in class diagram.

Unnamed parameter

Unnamed parameter

 

Related Know-how

Related Links

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply