Introduction

A use case diagram is a graphical representation of the interactions between users (actors) and a system. It helps to identify the system’s functional requirements by illustrating the different ways users can interact with the system to achieve specific goals. This tutorial will guide you through the basics of creating and understanding use case diagrams, using the Wheels bike hire system examples on object-oriented development.

What is a Use Case Diagram?

A use case diagram is a type of behavioral diagram defined by the Unified Modeling Language (UML). It consists of use cases, actors, and the relationships between them. Here are the key components:

Free UML Tool

  1. Use Case: Represents a specific functionality or service that the system provides to the user. It describes a goal that the user wants to achieve by interacting with the system.
  2. Actor: Represents a user or an external system that interacts with the system. Actors can be humans, other systems, or hardware devices.
  3. Relationships:
    • Communication Association: A line connecting an actor to a use case, indicating that the actor participates in that use case.
    • Include: A relationship between use cases where one use case includes the behavior of another.
    • Extend: A relationship between use cases where one use case extends the behavior of another under certain conditions.

Creating a Use Case Diagram

Step 1: Identify Actors

Identify all the actors that will interact with the system. These can be users, other systems, or hardware devices. For example, in the Wheels bike hire system, actors might include:

  • Receptionist
  • Administrator
  • Customer

Step 2: Identify Use Cases

Identify the main functionalities or services that the system provides. Each use case should represent a specific goal that an actor wants to achieve. For the Wheels system, use cases might include:

  • Maintain bike list
  • Maintain customer list
  • Handle enquiries
  • Issue bike
  • Handle bike return

Step 3: Draw the Use Case Diagram

  1. Draw Actors: Represent actors as stick figures.
  2. Draw Use Cases: Represent use cases as ovals.
  3. Connect Actors and Use Cases: Use lines to connect actors to the use cases they participate in.

Example: Wheels Bike Hire System

Let’s create a use case diagram for the Wheels bike hire system based on the information from the attached PDF.

  1. Actors:
    • Receptionist
    • Administrator
  2. Use Cases:
    • Maintain bike list
    • Maintain customer list
    • Handle enquiries
    • Issue bike
    • Handle bike return
  3. Use Case Diagram:

Step 4: Structuring Use Cases with Relationships

  1. Include Relationships: If a use case includes the behavior of another use case, draw a dashed arrow from the including use case to the included use case with the label «include».
  2. Extend Relationships: If a use case extends the behavior of another use case under certain conditions, draw a dashed arrow from the extending use case to the extended use case with the label «extend».

Example with Relationships

Let’s add some relationships to our Wheels bike hire system diagram.

  1. Include Relationships:
    • “Issue bike” includes “Handle enquiries” because issuing a bike always involves handling enquiries about the bike’s availability and cost.
    • “Handle bike return” includes “Print receipt” because returning a bike might involve printing a receipt if the bike is returned late or damaged.
  2. Extend Relationships:
    • “Issue bike” extends “Maintain customer list” because issuing a bike might involve adding a new customer or updating existing customer details.

Structuring Use Cases with Include and Extend Relationships

Explanation

  1. Actors:
    • Receptionist (rec)
    • Administrator (adm)
  2. Use Cases:
    • Maintain bike list (UC1)
    • Maintain customer list (UC2)
    • Handle enquiries (UC3)
    • Issue bike (UC4)
    • Handle bike return (UC5)
    • Print receipt (UC6)
  3. Relationships:
    • The Receptionist is involved in Maintain bike listHandle enquiriesIssue bike, and Handle bike return.
    • The Administrator is involved in Maintain bike list and Maintain customer list.
    • The Issue bike use case includes the Handle enquiries use case.
    • The Handle bike return use case includes the Print receipt use case.
    • The Issue bike use case extends the Maintain customer list use case.

Recommendation: Visual Paradigm for Use Case Diagrams

When it comes to creating use case diagrams, Visual Paradigm stands out as one of the best tools available. Here are several reasons why you might consider using Visual Paradigm for your diagramming needs:

1. User-Friendly Interface

Visual Paradigm offers an intuitive and easy-to-navigate interface, making it accessible for both beginners and experienced users. The drag-and-drop functionality simplifies the process of creating diagrams.

2. Comprehensive UML Support

As a versatile modeling tool, Visual Paradigm supports a wide range of UML diagrams, including use case diagrams, class diagrams, sequence diagrams, and more. This allows for seamless integration into your overall system design process.

3. Collaboration Features

Visual Paradigm provides robust collaboration tools, enabling teams to work together in real-time. This is especially beneficial for projects that require input from multiple stakeholders.

4. Customization Options

The tool offers a variety of templates and customizable elements, allowing you to tailor your diagrams to meet specific project requirements and branding guidelines.

5. Integration Capabilities

Visual Paradigm can integrate with other development tools and environments, streamlining your workflow and ensuring consistency across your project documentation.

6. Documentation and Reporting

The software includes features for generating comprehensive documentation and reports directly from your diagrams, which is useful for project presentations and stakeholder reviews.

7. Educational Resources

Visual Paradigm provides extensive tutorials and resources to help users get the most out of the tool, making it easier to learn and apply UML concepts effectively.

For anyone looking to create detailed and professional use case diagrams, Visual Paradigm is an excellent choice. Its combination of user-friendliness, comprehensive features, and collaboration capabilities makes it a top recommendation for both individual developers and teams. Whether you’re working on a small project or a large-scale system, Visual Paradigm can enhance your modeling experience and improve the clarity of your system designs.

Conclusion

In this tutorial, we have explored the fundamentals of creating and understanding use case diagrams, specifically in the context of the Wheels bike hire system. We began by defining the key components of a use case diagram, including actors, use cases, and the various relationships that can exist between them.

By following the structured steps of identifying actors and use cases, we illustrated how these elements interact within the system to fulfill user goals. The inclusion of relationships, such as “include” and “extend,” added depth to our diagram, showcasing how specific functionalities are interconnected.

Use case diagrams serve as a valuable tool for visualizing system requirements and improving communication between stakeholders. They provide a clear and concise way to represent how users engage with a system, helping to ensure that all functional requirements are considered during development.

As you continue to work with use case diagrams, remember that they are not only useful for design purposes but also for validating and refining system functionalities throughout the development lifecycle. By effectively utilizing these diagrams, you can enhance your understanding of user interactions and create more user-centric systems.