0

I understand the difference between include relationship and extends relationship in UML Use Case diagram but there are particular cases that I don't know how to handle. One of these is the following: There's a customer, some shops, a catalogue and some items sold by shops.
The customer wants to know:

  • What are all the shops in the system
  • What is the catalogue (a set of items) of a shop
  • Visualize the price and all the other information about an item in a catalogue of a shop

I want to design this situation with a Use Case diagram. So i made these three diagrams and I don't know which one is the correct one or if there's another way. Use Case diagram

  • In the first one the customer triggers "search shops" which eventually triggers "view shop catalogue". So in the flow of events there will be an if condition.
  • In the second one the customes trigger all the three use cases but "view shop catalogue" needs to include "search shops" in order to be performed.
  • In the third one there are extends instead of includes and the meaning it's like the first one.
Emmanuele
  • 35
  • 4
  • Doug's answer covers your question. Whether you expose the single UCs or only extend other UCs depends on the actions taken in the single UCs. The best is simply to avoid include/extend since you get by without in almost all cases and they tend to drift into functional decomposition which is not what you want here. – qwerty_so Feb 07 '20 at 23:39
  • @qwerty_so Doug's anwer is not so clear for my case. Do you suggest to do the second case (image) removing all the include relationships? In that case should i work on preconditions? Because a customer can't view an item detail if he hasn't viewed the shop catalogue – Emmanuele Feb 08 '20 at 09:38
  • 1
    It always depends on the details. The first case looks just like a no-go. The 2nd and 3rd case are 2 ways to represent the shop. Both are legal and offer a different user interface. – qwerty_so Feb 08 '20 at 11:22
  • @qwerty_so thanks very much. In what user interface is different between the second and the third case? – Emmanuele Feb 09 '20 at 12:27
  • 1
    In the last the user only has the entry to search and can eventually view the catlog and details. The middle one offers all of them directly. – qwerty_so Feb 09 '20 at 12:42
  • @qwerty_so the middle one doesn't offer all of them so directly because of include. If the customer triggers "view item detail" also "view shop catalogue" and "search shops" will be triggered – Emmanuele Feb 09 '20 at 12:47
  • Exactly, that's the result of using <>. No idea whether it's reasonable (to me it's not on first hand), but that's what you drew there. – qwerty_so Feb 09 '20 at 12:53

0 Answers0