1

There is an exercise that requires us to draw a usecase diagram for a bank, description says that a customer can make deposits and withdraw money. for that usecase scenario do i just draw "make deposit" and "withdraw money" ? or should I <<'include'>> "update balance" function for both of them as well ? useCase Diagram

2 Answers2

1

There is a rule of gold that help me solve similar situations, hope it helps for you.

Use case definition: Series of interaction between an actor and the system to obtain added value.

So, as you can see there are interactions, basically a use case is a series of interactions.

Which interactions are for update balance? None, is just a calculation the system (as opposed to the actor) does.

Let's specify that use case under the assumption is a business use case and is a ATM.

  • 1) Actor1 press 'start button'
  • 2) The system show present card screen
  • 3) Actor1 present card
  • 4) System present menu with options...
  • 5) Actor1 select withdraw .... ...
  • 6) System present screen with updated balance
  • 7) Actor1 select ....

So this is quite visual, is not a Use case in the first place, becouse there are no interactions involved. So there is no need to check if bring added value or not. Is just an important part of one of the many interactions involved.

There are exceptions in which you may take that shortcut, such as if you want be more clear in the model or if you what to divide work based on Use cases. But IMHO that's not use case at all.

You may have 'Show balance', but it would be only one interaction, with the exception if you have options like "show on screen" or "paper-print on a ATM"

Hope it helps.

Joako-stackoverflow
  • 506
  • 1
  • 6
  • 16
  • 1
    Nope. Authentication is as per your (correct) definition no use case since it does not add any value. Authentication is a pure constraint. – qwerty_so May 10 '18 at 16:13
  • IMHO when you include a UC the need for added value dilutes vs the purpose of the diagram. But you have a fair point I will remove it from the explanation. Since that is just my style and opinion, and yours is a fact. – Joako-stackoverflow May 11 '18 at 09:27
0

Is Update Balance a use case? Is there any added value for the actor? I guess not. It's a simple function which is performed as part of the other 2 use cases. You are trying (like most people) to perform functional decomposition. Just that two use cases share a common function does not make the function a use case. A use case is about added value which the system under consideration delivers to its actor(s). When you describe the scenario inside the use case, you might well refer to scenarios is other use cases. Each scenario step will end in an action. And you could simply refer to the action Update balance described in Make deposit when you describe Withdraw money. But the, Update balance is the result from a simple add operation. So why referring to that as a common function at all?

qwerty_so
  • 35,448
  • 8
  • 62
  • 86