我开始学习用例图,我很困惑。我不知道哪个图片更好。请帮助我,谢谢。
2 回答
The second one, where you have numerous Use cases linked to the actor is definitely better (actually the only one that makes any sense here). Those are actual functions provided by the system. Login or even Choose subject provide no real business value.
Actually I would even remove them completely from the UC diagram and do this decomposition on Activity diagrams. But if you really want to show reusability of UC parts (where you actually use include), the second diagram is acceptable.
The first one throw away and never do your UC diagrams this way anymore ;-)
它们都不是正确的,因为Login
没有用例。它没有附加价值。一个用例准确地显示了所考虑的系统将为其参与者之一带来的附加值。拍摄第二张照片并扔掉Login
,我会说“好的”。
您可以通过将约束附加到 UC tell 来表明需要登录{ actor must be logged on}
。或者,如果所有 UC 都需要登录,请将其附加到演员,例如{ all/UC x, y need a login}
.
此外,大多数人都错误地使用了扩展/包含。他们用它来进行功能分解,这是完全错误的。最好的办法是避免它们并保持简单的泡泡棒人协会。