2

A homework question:

Use an appropriate UML diagram, to describe the process of using a self-service-checkout to purchase stuff from a shop.

The diagram should focus primarily on the required actions taken by the checkout software in completing the transaction.

I have chosen to do this as a activity diagram as it clearly shows the actions taken by the checkout software in completing the transaction. Link to activity diagram

Is this the correct approach? Any advice?

Christophe
  • 68,716
  • 7
  • 72
  • 138
S1KRR
  • 41
  • 4
  • Actions sounds like? Hmm? Activity more or less? Oh, well, if you think that an activity contains Actions! – qwerty_so Sep 27 '20 at 15:06
  • Hi @qwerty_so can you kindly please elaborate. Would you suggest using a sequence diagram instead? – S1KRR Sep 27 '20 at 15:17
  • There are not sooo many UML diagrams that actually have one of the words above in their name. Hint: I did not use the word Sequence. – qwerty_so Sep 27 '20 at 15:21
  • @qwerty_so I understand what you meant thanks! Activity diagram is what I should be using as state diagram shows the state of objects as their states change which doesn't make much sense in this case. Is my understanding correct? – S1KRR Sep 27 '20 at 15:30
  • @qwerty_so can you kindly provide some feedback on the diagram I posted please – S1KRR Sep 27 '20 at 15:34
  • Looks good. I won't check details, but syntactically it's correct and likely what your teacher expects. – qwerty_so Sep 27 '20 at 16:09

1 Answers1

1

The requirement is to describe a process and focus on some actions. You can take this as a reflex: in UML, processes and process decomposition are best described with activity diagrams.

You can corroborate this conclusion, reasoning by elimination. Among all the UML diagrams, processes and actions are about behaviors of the system and not structure. So it's necessarily a behavioral diagram:

  • You can easily eliminate the use-case, because their focus is on objectives. Moreover there is no order between use-cases, which makes them a bad candidate to describe a flow of actions.
  • You can also eliminate the interaction diagrams, because the focus is on elements and their exchanges.
  • A state machine diagram can represent a flow of events or actions needed to complete some behavior. But the focus is more the state, and how the transition between the states is triggered. So it's more the opposite focus.
Christophe
  • 68,716
  • 7
  • 72
  • 138