How to Create a Use Case Diagram: A Step-by-Step Guide

Use Case Diagrams are a critical component of the Unified Modeling Language (UML) that depict the interactions between users (actors) and systems to outline functional requirements. These diagrams serve as a bridge between stakeholders and developers, offering a clear, visual representation of system functionalities and user roles, thereby facilitating a deeper understanding of system behavior and requirements.

Step 1: Setting Up the Project

Create a New Use Case Diagram:

  • Navigate to the Insert tab in the ribbon.
  • Click on the Insert to Project button, found within the Project group. This reveals a dropdown menu.
  • Select Add New Diagram. This action opens the New Diagram dialog.
  • In the dialog, choose Use Case Diagram from the available options.
  • Name your diagram "Online Shopping System" and click OK to create a new diagram canvas.

Step 2: Adding Actors

  • Access the Toolbox: Locate the toolbox on the left side of the Software Ideas Modeler interface.
  • Insert Actors: Find and select the Actor tool in the toolbox.
    • Drag and drop the tool onto the diagram canvas to create an actor.
    • Name the first actor "Customer".
    • Repeat the process to add two more actors, "Guest" and "Admin", positioning them appropriately on the canvas.

Step 3: Adding Use Cases for Each Actor

For the Customer Actor:

  • Select the Customer actor.
  • Click on "Add Use Case" in the context bar below.
  • Enter "Browse Items" and confirm with ENTER.
  • Add additional use cases: "Add to Cart", "Checkout", and "Write Review" using the same method.

For the Guest Actor:

  • Connect the Guest actor to the "Browse Items" use case using the Association tool to indicate shared access.
  • Add "Register" and "Log in" as additional use cases for the Guest actor.

For the Admin Actor:

  • Add "Manage Products" and "Manage Orders" as use cases to illustrate the admin's responsibilities within the system.

Step 4: Demonstrating Include and Extend Relationships

Include Relationship

  • Select the "Checkout" use case.
  • Click on the "Include" button in the context bar to add a new use case connected with an include relationship.
  • Name this new use case "Make Payment". This relationship indicates that "Make Payment" is a necessary part of the "Checkout" process.

The include relationship specifies a fundamental connection where one use case (in this case, "Make Payment") is inherently part of another ("Checkout") and is always executed as a part of the latter's process. It represents a mandatory action that must be taken within the overarching use case, illustrating a dependency that is crucial for the operation's completion.

Extend Relationship

  • Choose the "Extend" relationship tool from the toolbox.
  • Connect "Write Review" to "Checkout" to indicate that "Write Review" can optionally add steps to the "Checkout" process under certain conditions.

The extend relationship in UML is used to show optional functionality that adds steps to a base use case under certain conditions. In our example, the "Write Review" use case can optionally extend the "Checkout" process, indicating that customers have the choice to write a review after making a purchase. This relationship underscores the flexibility and conditional flow of actions within the system, where "Write Review" is not mandatory for "Checkout" to be considered complete but provides additional, situational functionality.

Download Example Use Case Diagram

Click the link below to download the project file for the Online Shopping System UML Use Case Diagram created in Software Ideas Modeler. This file includes the complete diagram as discussed in our tutorial, ready to be explored, analyzed, and utilized for your own projects or learning purposes.

Final Use Case Diagram

Online Shopping System (UML Use Case Diagram)
Online Shopping System (UML Use Case Diagram)

New Comment