用例图中包含和扩展有什么区别? [英] What's is the difference between include and extend in use case diagram?

查看:57
本文介绍了用例图中包含和扩展有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用例图?

推荐答案

Extend 用于当一个用例向另一个一流用例添加步骤时使用.

Extend is used when a use case adds steps to another first-class use case.

例如,假设提取现金"是自动柜员机 (ATM) 的一个用例.评估费用"将扩展提取现金并描述 有条件扩展点",当 ATM 用户不在 ATM 所属机构进行银行业务时,该扩展点"会被实例化.请注意,基本的提现"用例是独立的,没有扩展.

For example, imagine "Withdraw Cash" is a use case of an Automated Teller Machine (ATM). "Assess Fee" would extend Withdraw Cash and describe the conditional "extension point" that is instantiated when the ATM user doesn't bank at the ATM's owning institution. Notice that the basic "Withdraw Cash" use case stands on its own, without the extension.

Include 用于提取在多个用例中重复的用例片段.包含的用例不能独立存在,原始用例没有包含的用例是不完整的.这应该谨慎使用,并且仅在重复很重要并且是设计存在的(而不是巧合)的情况下使用.

Include is used to extract use case fragments that are duplicated in multiple use cases. The included use case cannot stand alone and the original use case is not complete without the included one. This should be used sparingly and only in cases where the duplication is significant and exists by design (rather than by coincidence).

例如,在每个 ATM 用例开始时发生的事件流(当用户放入他们的 ATM 卡,输入他们的 PIN,并显示在主菜单中)将是一个很好的候选者.

For example, the flow of events that occurs at the beginning of every ATM use case (when the user puts in their ATM card, enters their PIN, and is shown the main menu) would be a good candidate for an include.

这篇关于用例图中包含和扩展有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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