Class 您是否将构造函数作为方法包含在uml类图中?

Class 您是否将构造函数作为方法包含在uml类图中?,class,constructor,uml,diagram,Class,Constructor,Uml,Diagram,我正在做一个uml类图 我有一个类,我有变量和多个构造函数。 这些是否要包含在uml类图中 如果是 这个好吗 <<constructor>> Cells() <<constructor>> Cells(int)? Cells() 单元格(int)? 视情况而定 有时不显示,有时显示为常规方法,有时显式显示为特殊功能 原型和注释是您的朋友 .......................................................

我正在做一个
uml
类图

我有一个类,我有变量和多个构造函数。 这些是否要包含在
uml
类图中

如果是

这个好吗

<<constructor>> Cells()
<<constructor>> Cells(int)?
Cells()
单元格(int)?
视情况而定

有时不显示,有时显示为常规方法,有时显式显示为特殊功能

原型和注释是您的朋友

..........................................................
..........................................................
......+----------------------------------------+---+......
......|........................................|...|......
......|..This is the default constructor.......+---*---+..
......|............................................|...|..
......+--------------------------------------------+...|..
.......................................................|..
.......................................................|..
..+-------------------------------------------------+..|..
..|...............<<..class..>>.....................|..|..
..|.................MyVideoGame.....................|..|..
..+-------------------------------------------------+..|..
..|..+....MyVideoGame( )...........<<constructor>>..*--+..
..|..+.... MyVideoGame (int this)..<<constructor>>..|.....
..+-------------------------------------------------+.....
..|..+....~MyVideoGame( )...........<<destructor>>..*--+..
..+-------------------------------------------------+..|..
.......................................................|..
.......................................................|..
.......+-----------------------------------------+-----+..
.......|.........................................|.....|..
.......|..This is the default destructor.........+-----*..
.......|...............................................|..
.......+-----------------------------------------------+..
..........................................................
..........................................................
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
..........................................................
......+----------------------------------------+---+......
......|........................................|...|......
……这是默认构造函数……++--*--+。。
......|............................................|...|..
......+--------------------------------------------+...|..
.......................................................|..
.......................................................|..
..+-------------------------------------------------+..|..
..|....................................|..|..
我的电子游戏。。
..+-------------------------------------------------+..|..
我的电子游戏。。
..|..+.... 我的电子游戏(int this)。。。。。
..+-------------------------------------------------+.....
..|..+..~MyVideoGame()…..*-+。。
..+-------------------------------------------------+..|..
.......................................................|..
.......................................................|..
.......+-----------------------------------------+-----+..
.......|.........................................|.....|..
……这是默认的析构函数………+----*。。
.......|...............................................|..
.......+-----------------------------------------------+..
..........................................................
..........................................................
注意,我使用“c++”风格的构造函数和析构函数,但也适用于另一个p.L

U.M.L.为您提供了根据项目要求显示模型的灵活性


请忽略用于设置图表格式的额外要点。

很高兴看到UML的爱好者,但UML是什么时候写成U.M.L。?