Mastering Use Case AI: Structuring Wheels Bike Hire with UML

Use case diagrams are the foundational blueprint for understanding system requirements. They provide a visual representation of how actors interact with a system to achieve specific goals. In this tutorial, we will deconstruct the architecture of the Wheels Bike Hire System, a classic example used to demonstrate the power of Include and Extend relationships. By the end of this guide, you will understand how to model complex business logic without cluttering your diagrams with unnecessary detail.
1. Identifying the Actors and Boundaries
The first step in any modeling process is defining the system boundary and the external entities that interact with it. In the Wheels Bike Hire System context, we identify two primary actors:
- Receptionist: The primary user responsible for daily operations such as renting bikes, processing returns, and handling customer inquiries.
- Administrator: A secondary user focused on data maintenance, such as updating the bike inventory and managing customer records.
The system boundary encompasses all use cases (functionalities) that occur within the software. This separation helps developers distinguish between what the system does and who initiates the action.
2. Core Use Cases and Direct Interactions
Before diving into complex relationships, we must map the direct interactions between actors and the system. Based on the system diagram, the functional requirements are broken down as follows:
Receptionist Responsibilities
- Issue bike (UC4): The core rental transaction.
- Handle bike return (UC5): Processing the return of a rented item.
- Handle enquiries (UC3): Addressing customer questions or issues.
- Maintain bike list (UC1): Updating availability or status of bikes.
Administrator Responsibilities
- Maintain bike list (UC1): Similar to the receptionist, but with potentially different permissions or frequency.
- Maintain customer list (UC2): Adding, removing, or updating customer profiles.
3. The Art of Abstraction: Include Relationships
One of the most common mistakes in modeling is creating a separate use case for every single step a user takes. However, some steps are mandatory prerequisites for a larger task. This is where the <<include>> relationship shines. It represents a mandatory dependency.
Scenario A: Issuing a Bike
When a receptionist performs Issue bike, they must handle the situation if a customer calls with an enquiry. The diagram shows that Handle enquiries is included in Issue bike.
Scenario B: Returning a Bike
When processing a Handle bike return, the system is strictly required to Print receipt. You cannot return a bike without issuing a receipt in this context. Therefore, Print receipt is included in Handle bike return.
4. The Power of Extension: Conditional Logic
While Include handles mandatory steps, the <<extend>> relationship handles optional or conditional behavior. An extension occurs only under specific conditions.
In our diagram, Issue bike extends Maintain customer list. This might seem counter-intuitive at first—why would renting a bike update a list? This relationship implies a specific business rule: If a customer is not found in the system during the rental process, the system triggers an extension to Maintain customer list to register the new user.
5. Modeling the Architecture
To visualize this architecture effectively, we use PlantUML syntax. This code defines the actors, the system boundary, and the directional arrows for relationships.
@startuml
left to right direction
actor "Receptionist" as rec
actor "Administrator" as adm
rectangle "Wheels Bike Hire System" {
usecase "Maintain bike list" as UC1
usecase "Maintain customer list" as UC2
usecase "Handle enquiries" as UC3
usecase "Issue bike" as UC4
usecase "Handle bike return" as UC5
usecase "Print receipt" as UC6
UC4 ..> UC3 : <>
UC5 ..> UC6 : <>
UC4 --|> UC2 : <>
}
rec --> UC1
rec --> UC3
rec --> UC4
rec --> UC5
adm --> UC1
adm --> UC2
@enduml
6. Recommended Tooling: Visual Paradigm
While text-based modeling is powerful, graphical tools offer superior visualization. Visual Paradigm is a top-tier recommendation for creating these diagrams due to several key advantages:
- User-Friendly Interface: Its drag-and-drop functionality allows for rapid prototyping of use case structures.
- Comprehensive UML Support: It supports a wide range of diagrams, ensuring consistency if you move from use case diagrams to sequence or class diagrams later.
- Collaboration Features: Teams can work in real-time, which is vital for gathering requirements from multiple stakeholders like the Receptionist and Administrator roles.
- Documentation & Reporting: Visual Paradigm can automatically generate reports from your diagrams, making it easy to present your system design to stakeholders.
Conclusion
The Wheels Bike Hire System use case diagram effectively demonstrates how to balance simplicity with complexity. By using Include, we abstracted mandatory steps like printing receipts. By using Extend, we captured conditional logic like new customer registration. Whether you are using a text editor like VPasCode or a robust tool like Visual Paradigm, mastering these relationships is essential for clear system architecture.











