【发布时间】:2014-07-26 06:25:49
【问题描述】:
我目前正在学习 OCUP UML 基础考试。 在阅读这本书时,我发现了一些关于操作的奇怪之处。
操作的语义:
[visibility] name (parameter list)[:type][{property strings}]
现在有以下例子:
- getPoistion(return x: int, return y: int)
- enlarge(byFactor: Real) : GeomFigure
- +addPhone(phone:String)
- deposit(in amount, Amount): Amount
- #release(): contractStatus
- "create"create()
最后一个我觉得很奇怪。有人可以解释一下为什么允许这样做吗? 因为名称前唯一允许的语义是可见性修饰符。
亲切的问候,
维姆
【问题讨论】:
标签: uml semantics operations