Example: Self-Service machine


The main function of self-service machine is to allow a customer to buy a product(s) from the machine (candy, chocolate, juice...). Every user that you asked for a set of scenarios happening during usage of machine, can tell you that main use case can be labeled as "Buy a product". Let's examine every possible scenario in this use case.

  • The "Buy a product" use case
  • The actor in this use case is a customer. This customer wants to buy some of the products offered by the self-service machine. First of all he/she inserts money into the machine, selects one or more products, and machine presents a selected product(s) to the customer. Use case diagram for this scenario can be represented as: