Mada za sehemu hiiIdentifying and analysing software development requirementsMada 3
- Collecting requirements
- Analysing requirements
- Modelling use cases
Once we have gathered requirements from stakeholders and identified what the system must do, we need to communicate this information clearly to everyone involved in building the system. Use case modelling is a visual way to show how users (called actors) interact with the system. It helps us see the system's scope—the complete set of actions it must support.
A use case diagram is a visual representation that shows how users interact with a system. It helps us understand the system's boundaries and what functionalities it must provide.
Elements of a Use Case Diagram
A use case diagram consists of three main elements:
1. Actor
An actor represents a user or external system that interacts with the system we are developing. Actors are drawn as stick figures. Examples of actors include customers, teachers, students, administrators, or even other computer systems.
2. Use Case
A use case represents a specific action or task that an actor performs within the system. Use cases are drawn as oval shapes. Examples include "Login," "Register Student," "View Results," or "Generate Report."
3. Relationships
Relationships show how actors and use cases are connected. There are three types:
-
Association relationship: Connects an actor to a use case to show they interact. It is drawn as a solid line.
-
<
> relationship : Shows that one use case always calls or uses another use case. It is drawn as a dashed arrow labelled "<>". -
<
> relationship : Shows that a use case may add optional functionality to another use case. It is drawn as a dashed arrow labelled "<>".
While use case diagrams give us a high-level picture, we need detailed descriptions to explain how each use case works. A use case description provides a step-by-step explanation of actor-system interactions.
Components of a Use Case Description
A complete use case description includes:
| Component | Description |
|---|---|
| Use case name | A clear, descriptive name of the use case |
| Actor(s) | The users or external systems that interact with the use case |
| Description | A brief summary of what the use case does |
| Precondition | What must be true before the use case can start |
| Input(s) | Data the user provides to complete the process |
| Flow of events | Step-by-step sequence of actions and system responses |
| Postcondition | The outcome or state after the use case completes |
| Relationships | Connections to other use cases (< |
Let us apply use case modelling to a Student Information Management System (SIMS) used in Tanzanian schools.
Step 1: Identify the Actors
From the requirements, the actors are:
- Teachers
- Students
- School administrators (Headmaster, Academic Master)
- Parents/Guardians
- System Administrator
Step 2: Identify the Use Cases
Based on functional requirements, the use cases include:
- Login to system
- Register student
- Register subject
- Enter grades
- Generate exam report
- View results
- Receive SMS notification
- Create account
Step 3: Create the Use Case Diagram
The diagram shows actors as stick figures outside the system boundary, use cases as ovals inside, and lines connecting actors to the use cases they perform.
Step 4: Write Use Case Description
Here is an example for "Register Student" use case:
Use Case: Register Student
Actor: Teacher
Description: The system shall allow a teacher to register a student in the system.
Precondition: The teacher must be logged into the system.
Inputs:
- Student registration number
- Personal information (names, sex, date of birth)
- Class
- Address
- Parent information (names)
Flow of Events (Main flow):
- The teacher selects "Register Student" option.
- The system prompts the teacher to enter student details.
- The teacher enters required information and submits the form.
- The system validates the data, registers the student, and displays a confirmation message.
Flow of Events (Alternate flow): If any data is invalid or missing, the system prompts the teacher to correct the errors before proceeding.
Postcondition: The student is successfully registered, and details are stored in the database.
Try modelling an online food ordering system with these steps:
- Identify at least three actors (e.g., Customer, Restaurant, Delivery Rider)
- List functional requirements
- Create a use case diagram
- Write use case descriptions for two use cases
This practice helps you apply the same steps to any system you analyze.
In Tanzania, use case modelling is applied when developing systems like M-Pesa or school management software. For example, when a small shop owner in Arusha wants a stock management system, a developer uses use case diagrams to identify actors (shopkeeper, supplier) and use cases (add stock, record sale, generate report), ensuring the final system actually meets the user's real needs before writing any code.
Jinsi utakavyotathminiwaTathmini ya mchakato · Tathmini ya matokeo · Tathmini ya maarifa
Tathmini ya mchakato
- Identify actors and theirinteractions with the system.
- Develop accurate use case descriptions and diagrams.
- Validate diagrams with peers or stakeholders.
Tathmini ya matokeo
Complete and accurate use case diagrams, with detailed descriptions that cover various system interactions and scenarios.
Tathmini ya maarifa
Detailed knowledge of:
Method used: The student should explain how to
- model use case using UML standards.
Principles: The student should explain the principles of:
- simplicity, stakeholder validation, and completeness.
Theories: The student should explain:
- Concepts of Unified Modeling Language (UML) framework.
Circumstantial knowledge:
Detailed knowledge about:
- edge cases and system interactions
Swali
What are the three main elements of a use case diagram?
Ingia ili kuwasilisha jibu lako na lihesabiwe katika umahiri wako.
Ingia ili kufanya mazoeziMwalimu
Umekwama? Niulize chochote kuhusu mada hii.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu swali hili.
Ingia ili kuulizaMajadiliano
Hakuna maswali bado