如何使用用例关系 - uml [英] how to use use case relations - uml

查看:29
本文介绍了如何使用用例关系 - uml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!我一直在研究UML,我正在尝试设计一个问题的用例图.

Heys guys! Im have been study UML and im trying to to design the use case diagram of a problem.

让我们假设我的应用程序包括:

Lets supose my app consists in this:

两个要求:- 创建团队- 创建玩家

Two Requesites: - create teams - create players

这是交易:用户可以创建一个团队,创建一个团队后,他可以为该团队创建球员(不是必需的).但是在这个应用程序中有多个用户,一个用户可以创建一个团队,另一个用户可以创建玩家.唯一的限制是创建玩家必须已经存在一个团队.我研究了一下,结果有点困惑.如果我正确理解用例图上的关系概念,我想我应该有以下两个用例:

This is the deal: A user can create a team, and after create a team he can create players for that team(not required). But in this app there are multiple users, and a user can create a team and other user can create players. The only constraint is that to create players must exist alreay a team. I research and i end up a little confuse. If i get the concepts of relations on use case diagrams right, i think i should have the folowwing two use cases:

[用例 - 创建团队] <-------extends---- [用例 - 创建玩家]

[use case - create team] <-------extends---- [use case - create player]

我需要意见,这是正确的解决方案吗?或者我应该有两个不相关的用例?

I need opinions,Is this the proper solution? or should i have two not related use cases?

提前致谢,对不起我的英语.

Thanks in advance, and im sorry my english.

推荐答案

通常,在用例图中,您不需要像A must be done before B do B"这样的依赖关系建模.用例应该代表一组 Szenarios,将它们分组为一个常见用例.

Generally you do not need to model dependencies like "A must be done before doing B" in a Use Case Diagram. Use Cases should represent a set of Szenarios to group them as a common case.

extends"依赖用于指定比扩展更特殊的用例.因此,如果您想表达创建球员是使用扩展"创建团队的特殊形式,那就没问题了.但这与上述情况不符.

The "extends" dependency is used to specify a Use Case which is more special than the extended one. So, if you would like to express that creating a player is a special form of creating a team using "extend" would be fine. Bbut this does not match the situation described above.

如果您想表达创建游戏总是意味着创建团队,您可以使用包含"依赖项.这可能与您的情况相符,但 imo 并不完全如此.

If you would like to express that creating a playing always means to create a team as well, you can use an "include" dependency. This could match your case but imo does not entirely.

最后一个选项是绘制一个未指定的依赖关系(没有 << >> 标记),表示用例彼此之间有一些事情要做.

The final option is to draw an unspecified dependency (no << >> marker) the express that the use cases have something todo with each other.

我的建议:在这种情况下不要使用任何依赖项.

My recommendation: don't use any dependency in this case.

一些更好的解释可以在这里,顺便说一句.

Some more good explanations can be found here, btw.

这篇关于如何使用用例关系 - uml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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