A use case explains how the user will perform tasks on the software. The specification of use cases is typically documented in a requirements document before the development. Use cases are characterized as follows:
Business use cases describe the high-level functional requirement. It is written in non-technical terms so that the end-users and customers can easily understand them.
For example, in a hotel management system, the business use case is defined as follows: The user looks at different room packages and books a room.
System use cases describe the functional requirement in lower-level implementation details and might include technical jargon.
For example, in a hotel management system, the system use case is defined as follows:
The user browses the room packages and books a room through a web application.
The use cases of a system are commonly represented through a use case model. A use case model consists of the following components:
Actors - the users who interact with the system.
Use Cases - a written description of the requirements from the actor’s point of view.
Relationships between actors and use cases.
The use case model can be used to represent use cases in a use case diagram. A simple example of the use case diagram of an e-commerce website is shown below:
The two actors are customer and admin.
The three use cases are browse information, place order, and view orders.
Both the customer and admin can browse information. However, only the customer can place order. Likewise, only the admin can view orders.
To write a use case, follow the steps given below:
Identify the system’s actors and start with one of the actors, for example, the customer of an e-commerce website.
Define what the customer wants to use the system for. For example, browsing information or online shopping. All these actions will become the use cases.
For each use case, describe the normal and alternate flow of events. The flow of events should include the customer’s actions and the system’s responses to them.
Repeat the steps for all the actors of the system.
Use Case ID | 1 |
Use Case Name | View Orders |
Actors | Admin |
Description | The admin will be able to view all the orders placed by the customer. |
Normal Flow |
|
Alternate Flow | None |
Use cases help organize the various functions of the system from the perspective of different users. They help the development team to brainstorm ideas and access the feasibility of the use cases. Hence, defining use cases is an essential step in software development.