use case diagram examples in software engineering

Mastering Software Engineering: Real-World Use Case Diagram Examples

By Ashley Lee
AD

Use case diagrams are indispensable tools in software engineering, offering a high-level, visual representation of a system's functionality. They help stakeholders understand the intended functionality of a system and serve as a bridge between business and technical requirements. Let's explore the power of use case diagrams through various practical examples.

Use case diagrams are especially useful in object-oriented software development, as they depict the interactions between users (actors) and the system, defining the system's boundaries and functionalities. These diagrams are part of the Unified Modeling Language (UML), which is widely accepted and used in the software engineering community.

Understanding Use Case Diagrams: Key Elements

Before diving into examples, let's quickly recount the key elements of a use case diagram:

AD
Use Case Diagram Tutorial: What It Is and How to Create One | Creately
Use Case Diagram Tutorial: What It Is and How to Create One | Creately
UML Use Case Diagram for Airline Reservation
UML Use Case Diagram for Airline Reservation
How to create a use case diagram | moelgendy blog
How to create a use case diagram | moelgendy blog

1. **Actors**: These are the users or external entities that interact with the system. They are represented as stick figures.

2. **Use Cases**: These represent the functional goals or tasks that actors want to achieve using the system. They are shown as ovals and describe the system's behavior with its actors.

Download Use Case Diagram for Library Management System
Download Use Case Diagram for Library Management System
UML Use Case Diagram
UML Use Case Diagram
Use Case Diagram - Student Management System
Use Case Diagram - Student Management System

3. **Boundaries**: A dashed line enclosing the system, indicating the limits of the system's functionality.

Use Case Diagram - Healthcare System

A use case diagram for a hospital information system might include the following:

AD

**Actors**: Doctors, Nurses, Patients, Administrators

Use Case Diagram Tutorial: What It Is and How to Create One | Creately
Use Case Diagram Tutorial: What It Is and How to Create One | Creately
Online Shopping System (UML Use Case Diagram)
Online Shopping System (UML Use Case Diagram)
Use Case Diagram for ATM Machine
Use Case Diagram for ATM Machine
UML Use Case Diagram
UML Use Case Diagram
Smart UX: Use Cases - Usability Geek
Smart UX: Use Cases - Usability Geek
Use Case Diagram for Login and Registration | UML
Use Case Diagram for Login and Registration | UML

**Use Cases**: Schedule Appointment, Update Patient Records, Perform Lab Tests, Generate Reports, Manage Staff Schedules

**Boundaries**: All interactions and tasks performed by actors within the system would be included, but external processes like lab specimen transport would not.

AD

Use Case Diagram - Online Shopping System

Considering an online shopping application, the use case diagram might illustrate the following:

Sistema de cajeros (caso de uso) (es) | Creately
Sistema de cajeros (caso de uso) (es) | Creately
Use Case Diagram for E-Commerce Websites
Use Case Diagram for E-Commerce Websites
the system design master template is shown in this diagram, which shows how to use it
the system design master template is shown in this diagram, which shows how to use it
Bank Transaction System | Creately
Bank Transaction System | Creately
Simple Usecase Template | Creately
Simple Usecase Template | Creately
Use Case Diagram for College Management System
Use Case Diagram for College Management System
Use Case for Airline Reservation
Use Case for Airline Reservation
Login System Use Case Diagram | UML
Login System Use Case Diagram | UML
Use Case Diagram for Student Enrollment System
Use Case Diagram for Student Enrollment System
Virtual Assistant | Creately
Virtual Assistant | Creately
a diagram with several different types of data
a diagram with several different types of data
Use Case Diagram for Event Management System
Use Case Diagram for Event Management System
a diagram that shows the flow of different items in an organization, including two people and one person
a diagram that shows the flow of different items in an organization, including two people and one person
Student Attendance System | Creately
Student Attendance System | Creately

**Actors**: Customers, Sellers, Administrators

**Use Cases**: Browse Products, Add to Cart, Place Order, Update Order Status, Manage Product Listings (for Sellers), Analyze Sales Stats (for Administrators)

AD

**Boundaries**: The system includes all functional aspects of online shopping, from browsing to ordering and managing products, but excludes delivery processes that occur after the order has been placed.

Applying Use Case Diagrams in Software Development Lifecycle

Use case diagrams are most effective when developed early in the software development lifecycle (SDLC), playing a crucial role in:

1. **Requirement Gathering**: They help stakeholders identifies functional goals and user needs.

2. **System Design**: They aid in designing the system architecture by defining system boundaries and interactions.

Use Case Diagram in Agile Development

In Agile methodologies, use case diagrams can be adapted to represent user stories and acceptance criteria, providing a visual representation of backlog items.

**User Story**: As a Patient, I want to view my medical history (ViewMedicalHistory) so that I can stay informed about my health.

**Acceptance Criteria**:

  1. The system shall display a list of medical history entries for the logged-in patient.
  2. The entries shall be sorted by date, with the most recent first.
  3. The patient shall be able to filter the entries by date range.

Use Case Diagram in Model-Driven Architecture

In MDA (Model-Driven Architecture), use case diagrams help in creating platform-independent models that can be transformed into platform-specific implementations.

The use case diagram serves as a high-level view of the intended system behavior, acting as a blueprint for software developers, testers, and users. As such, it's essential to craft these diagrams carefully, accurately, and effectively to derive the most significant benefits from their use.

In conclusion, mastering the use case diagram is a foundational skill in software engineering that's as relevant today as it was decades ago. As software systems evolve, so too do the use cases, making this a dynamic and engaging aspect of the software engineering profession.

AD