three use cases into one use case

2019-09-18 07:02发布

问题:

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.



标签: uml use-case