UML多重性的语法是什么? (在班级框内) [英] What's the UML syntax for multiplicity? ( inside the class box )

查看:99
本文介绍了UML多重性的语法是什么? (在班级框内)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以在同一类框中指定多重性,而不必绘制到另一个类的链接.

I know it is possible to specify the multiplicity within the same class box, without having to draw the link to another class.

我的问题是,名称或类型后面的多重性应该去哪里?

My question is, Where should the multiplicity go, after the name or after the type?

是吗

可见性名称多重性:类型

+ clients [0..n] : Client

可见性名称:输入多重性

+ clients : Client [0..n]

我有两本书(Larman和UML的《应用UML和模式》以及Arlow和Newstadt的《统一过程》),但它们有所不同

I have two books (Applitying UML and Patterns by Larman and UML and the Unified process by Arlow and Newstadt ) but they differ

推荐答案

示例...

Example ...

+ createWindow(位置:坐标,容器:容器 [0..1] ):窗口

+createWindow (location: Coordinates, container: Container [0..1]): Window

更多示例,来自印刷元素97上的多重性元素规范.

MORE Examples from the multiplicity element spec, on printed page 97.

Spec中关于多重性的示例.

Example from Spec on multiplicity.

|--------------------------------------------|
|                Customer                    |
|--------------------------------------------|
| purchase : Purchase [*] {ordered, unique}  |
| account: Account [0..5] {unique}           |
|                                            |
|--------------------------------------------|

这篇关于UML多重性的语法是什么? (在班级框内)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆