three use cases into one use case

你离开我真会死。 提交于 2019-12-04 05:19:47

问题


I have one actor (admin), he can perform some actions over other user accounts such as creating the account, editing the account and deleting the account account. Should I do something like this:

          -->UseCase:createAccount
         /
    o   /
   -|- /
    | -----> UseCase:DeleteAccount
   / \ \
  Admin \
         \-->UseCase:EditAccount

Or should I do a single case?

    o   
   -|- 
    | -----> UseCase:ManageAccounts
   / \ 
  Admin

I'm asking this question because I feel that is harder to explain the successful case in the use case description if I have three actions in a single use case. Thanks for your time.


回答1:


You can have the abstraction to Manage Accounts by having it generalize the three use cases.

Like so:

You can refer to the abstract use case where you need things to be in compact form, and refer to the much more precise "sub" use cases where you want to show details.




回答2:


Second one is a better option to adopt as far as clean code and modularity is concerned.




回答3:


I think that in the diagram, the Admin actor should interact with the specialized (child) use cases rather than the more abstract (parent) use case.

Furthermore, it is a good practice to show the system boundary using a frame around all the use cases implemented by your system. This is especially helpful when you have more than one external actor.

This page is also helpful for understanding the concept of generalization.



来源:https://stackoverflow.com/questions/22457604/three-use-cases-into-one-use-case

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!