打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Association between two use cases in UML

First let's give right name to this relationships:

In Use Case Diagram, between use cases, you can define 3 relationships:

  1. Include
  2. Extend
  3. Generalization

Then Warn You About Use Cases

Use Cases are text stories which shows interaction of "actors" with system in order to reach a "goal".

So instead of asking "is it okay to use use this relationship or not, first write your use case scenarios. You do not have to ( and should not) write all of them in details. Work in an iterative way.

Check The Life Cycle of a Use Case

Include RelationShip

While you are writing use cases, if you see that some steps in use case scenarios , occur again and again.[ many times] then extract repeating steps a separate use-case, then reference it from the other use cases using "include" relationship.[ to avoid reputation]

Or you may use "include" relationship to decompose a long use case into smaller subunits[ Be careful, avoid functional decomposition ]

Extend Relationship

You have an optional behaviour in use case base based on a condition. But many times, while you are writing your use cases, you have a Extensions sections and without showing extend relationship in a diagram, you can just record-write optional behaviour in that[ Extensions] sections. But if you think optional behaviour is important and should be seen on use case diagram, then show it on diagram with extend relationship

Generalize Relationship

If you are a novice modeller stay away from Generalize Relationship. It is interpretation [ how to write its text story ] is somehow problematic.If wanted to get more info Check Chapter Using Generalization between Use Cases of the bookUse Case Modeling,Kurt Bittner Ian Spence or Patterns for Effective Use Cases , Steve Adolph, etc... [ Section 7.5. CapturedAbstraction—A Pattern for Applying UML Generalization, by Dan Rawsthorne]

About Sample Diagram:

The "Rent video" and "Charge credit" card relationship is technically legal since it is said that Rent Video use case include "Charge Credit" : In order to rent a video you should always charge credit card. And this step[Charge Credit] is also repeating by Pay Late Fee use case [ according to your diagram]

And discount is "optional" based on a condition [ may be if you take more than 3 you have] so "extend" is also technically legal.

But you have unnecessary lines , which I do not understand.

Final Advice:

Do not waste your time on Use Case Diagrams to much.The important thing is use case scenarios. And when possible use minimum relationships in your use case diagrams.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
包含(include)、扩展(extend)和泛化(generalization)关系和区...
实施UML九项注意(英文)
Use Cases: When to use Includes, Generalization and Extending
英语介词习语归纳(in类)
Visual Studio UML Use Case Diagram(1)
Create UML diagrams online in seconds, no spe...
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服