Whimsical LogoWhimsical LogoWhimsical Logo

Brand
Get all logo versions.
Download

UML Use Case Diagram

A UML use case diagram shows what a system does from the user's point of view: the actors who use it, the things they can do, and how those use cases relate. This template is a worked restaurant example, with actors like Customer, Waiter, and Chef connected to use cases like Order Food and Pay for Food. Analysts and developers use it to capture requirements and agree on a system's scope before building.

A restaurant UML use case diagram: actors connected to use cases, with associations and extend links.

What's included

  • Four actors. Customer, Cashier, Waiter, and Chef, drawn as icons outside the system.
  • Nine use cases. Order Food, Order Wine, Cook Food, Serve Food, Pay for Food, and more, drawn as ovals.
  • Labelled associations. Lines linking actors to use cases, marked with the interaction (place order, accept payment).
  • Extend relationships. Dashed «extend» links for optional behavior, like 'extend if wine ordered'.
  • An editable example. Swap the restaurant scenario for your own system's actors and use cases.

Why make a use case diagram?

  • Capture requirements visually. A use case diagram turns 'what should the system do?' into a picture everyone reads the same way.
  • Define scope. The system boundary makes it clear what's in and what's out.
  • Agree before building. Actors and use cases get stakeholders and developers aligned early.
  • Spot missing behavior. Laying out who does what surfaces use cases nobody had thought of.
  • Communicate without jargon. Non-technical stakeholders follow actors and goals more easily than code.

How to use this template

  1. Open the template. It lands as a worked restaurant use case diagram you can edit.
  2. List the actors. Identify everyone and every system that interacts with yours, and place them outside the boundary.
  3. Add the use cases. Write each thing the system does as an oval inside the boundary.
  4. Connect with associations. Draw a line from each actor to the use cases they take part in.
  5. Add include and extend. Use «include» for shared steps and «extend» for optional behavior.
  6. Share for review. Invite stakeholders to confirm the scope is right.

Use case diagram vs sequence diagram

A use case diagram shows what actors can do with a system at a high, requirements level: the functional goals, without specifying order or timing. A sequence diagram shows how one scenario plays out message by message over time, between specific objects. In a restaurant, 'a customer orders food' is a use case; the back-and-forth between the waiter and the kitchen to fulfil it is a sequence. Use one to define what, the other to detail how.

Frequently asked questions

  • A use case diagram is a UML diagram that shows how users interact with a system. It has actors (the people or systems outside), use cases (the things the system does, drawn as ovals), and a boundary that marks what's in scope. Lines connect actors to the use cases they take part in. It's used to capture requirements and agree on scope.

  • A use case diagram has four main parts: actors (roles outside the system, drawn as stick figures or icons), use cases (functions the system performs, shown as ovals), the system boundary (a box around the use cases), and relationships, the associations between actors and use cases plus «include» and «extend» links between use cases.

  • Both connect one use case to another, but they mean different things. «include» is for mandatory shared behavior that always runs, like 'Authenticate' included by several use cases. «extend» is for optional or conditional behavior that only runs sometimes, like 'Serve Wine' extending 'Serve Food' if wine was ordered. Include is always; extend is sometimes.

  • A use case diagram shows what actors can do with a system at a high, requirements level: the goals, not the order. A sequence diagram shows how one scenario plays out step by step, the messages passed between objects over time. Use a use case diagram to define what the system does; use a sequence diagram to detail how a specific interaction works.

  • Three common examples: a restaurant system, where a Customer places an order, a Waiter serves it, and a Chef cooks it, with 'Serve Wine' extending 'Serve Food'. An ATM, where a Customer withdraws cash and checks a balance, both including 'Authenticate'. And online shopping, where a Customer browses and checks out (including 'Log in') and an Admin manages inventory. This template uses the restaurant example.