Use case diagrams are used to help capture the behavior and requirements of a system, as well as describing the systems functions. They show how the system interacts with users through modeling the relationships between actors and use case nodes. Use case diagrams can be a single diagram for the entire system or multiple diagrams, where each models a functionality or requirement. Use case diagrams are typically developed early in the project and referred back to throughout the development process.
When creating a use case diagram, you will need to first create your use cases. Use cases are used to define functionality of a system and can show the steps taken when processing a function. The first step to creating a use case is to define your primary actors. Actors are people or devices that directly interact with certain functionalities of the system. Each actor has one or more goals that they wish to achieve through the system. Although actors do showcase the systems functionality, actors aren’t necessarily individual users. Actors, instead, represents a class of external entity relevant to a specific use case. Each actor can be played by multiple users, or all can be played by one. Once you have your primary actors defined, you can start creating your use cases that can answer the following questions:
1. Who is the primary actor, the secondary actor(s)?
2. What are the actor’s goals?
3. What preconditions should exist before the story begins?
4. What main tasks or functions are performed by the actor?
5. What exceptions might be considered as the story is described?
6. What variations in the actor’s interaction are possible?
7. What system information will the actor acquire, produce, or change?
8. Will the actor have to inform the system about changes in the external environment?
9. What information does the actor desire from the system?
10. Does the actor wish to be informed about unexpected changes?
Example
A pizza restaurant chain wants to set up an online ordering system. They want the customer to be able to order a pizza online with their payment information and address. The customer should also be able to choose their pizza toppings and size. This order should be sent back to the specific restaurant the customer ordered from, and the customer should receive the cost of their order.