UML类图枚举 [英] UML class diagram enum
本文介绍了UML类图枚举的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我建模一个类图。类的属性是枚举。我如何建模?通常你会这样做:
- name:string
$ p
解决方案他们可以使用枚举简单显示如下:
_______________________
| << enumeration>> |
|天气!
| _____________________ |
|星期日|
|周一|
|星期二|
| ... |
| _____________________ |
然后只是与你的班级之间有一个关联。
I am modeling a class diagram. An attribute of a class is an enumeration. How do I model this? Normally you do something like this:
- name : string
But how does one do this with an enum?
解决方案They are simply showed like this:
_______________________ | <<enumeration>> | | DaysOfTheWeek | |_____________________| | Sunday | | Monday | | Tuesday | | ... | |_____________________|
And then just have an association between that and your class.
这篇关于UML类图枚举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文