Advice on which UML diagram to choose for self service checkout

798 views Asked by At

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?

1

There are 1 answers

0
Christophe On BEST ANSWER

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.