Capturing Requirements with Use Cases
a set of structured requirements and use cases using a set. of heuristics and .. relationship between the CCs, (ii) if a statement results in. The use cases describe typical interactions between the users of the system and the system The functional requirements describe the system's functionality like: The difference is in the way the information is presented. do you need both use cases and functional requirements or just one The difference is only in approach if one were to close-read the.
Also use-cases provide a great starting point for the test cases that will be used to test the system. A use case is a definition of a specific business objective that the system needs to accomplish. A use-case will define this process by describing the various external actors or entities that exist outside of the system, together with the specific interactions they have with the system in the accomplishment of the business objective.
Types of Use Case Use cases can be described either at an abstract level known as a business use-case or at an implementation-specific level known as a system use case. Each of these is described in more detail below: Business Use Case - Also known as an "Abstract-Level Use Case", these use cases are written in a technology-agnostic manner, simply referring to the high-level business process being described e. The business use case will define the sequence of actions that the business needs to perform to give a meaningful, observable result to the external entity.
System Use Case - Also known as an "Implementation Use Case", these use cases are written at a lower level of detail than the business use case and refer to specific processes that will be carried out by different parts of the system. For example a system use case might be "return book when overdue" and would describe the interactions of the various actors borrower, librarian with the system in carrying out the end-to-end process.
Typically you will start by defining the high-level business use-cases, and as the system requirements get defined, they will will be "drilled-down" into one or more lower-level system use cases.
Scenarios and User Stories One related artifact is the "business scenario" or user story. These are similar to use cases in terms of what they seek to accomplish - a description of the how the system will carry out a specified business process to fulfill the stated requirements. However unlike a use case which is a step-by-step enumeration of the tasks carried out during a process with the associated actorsa scenario is much more free-form.
A user story is typically a narrative that describes how a user would experience the functionality of the system. As the name suggests it is a "short story" that describes the tasks they carry out, what information they see and how they interact with the system. You could think of it as an inline function call. The includes relationship is useful when a sequence of interactions is common across use cases.
The generalization relationship is an alternative to writing a complex variation to the main scenario. For example, consider a home security system that has a special hostage code you can type in.
Never mind the possibility of actually remembering the hostage code while being threatened. If the home owner enters the special hostage code the alarm is silenced but a security alert is sent to the local police anyway. This alternative scenario could be represented with a separate use case: Generalization The Signal for help use case is a specialize form of the Deactivate alarm use case.
Think of it as a form of polymorphism. The Signal for help use case contains all the activity in the Deactivate alarm use case plus more. The Signal form help use case not only deactivates the alarm it also sends a distress signal to the local police.
The generalization relationship is like the extends relationship discussed next. The most significant difference is that the specialized use case is free to extend any part of the base use case.
With the extends relationship the base use case can specify the points that can be extended. The extends relationship is like the generalization relationship with added constrains. With the extends relationship the use case being extended is required to specify the points that can be extended. Extending use cases are limited to extend only the the points of the base use case specified as extendable. For example, consider a set of use cases for an ATM machine: ATM use case diagram Transactions are written as separate use cases that extend the base use case Session.
Use cases which extend Session are required to implement transactions. One difference between includes and extends is that an "included" use case is essential to the completion of the use case doing the including. A use case that extends another use case may or may not be included in the realization of the extended use case. Uses cases also help to define iterations. Iterations are often defined in terms of the use cases they implement.
Use Cases and Scenarios
Written use cases are also a good source of analysis and domain classes. Use cases help shape user interfaces. The user interface must provide the necessary functionality for the user to execute a use case. Use case also help determine architecture. It's impossible to know all the requirements use cases for a system upfront.
A small set of key use cases, architecturally significant use cases, can provide the basis of the system architecture. If the right set of architecturally significant use cases is identified and used to design the system the use cases that come later should fit in without significantly changing the architecture of the system.
Use cases can also be used to create test cases during the testing phase. Use cases also offer a good start for the construction of a user manual. Use cases can also be realized during the analysis and design phases. During design use cases can be realized by classes and their interactions in detailed closer to implementation class diagrams and interaction diagrams. A Process for Writing Use Cases A use-case model includes actors, use cases and the relationships between actors and use cases.
These elements will emerge incrementally and become more refined over time.
For example, you might start out by identifying an actor which suggests a use case and in the process of detailing the use case you discover another actor. You can develop the elements of a use-case model in any order but the following sequence of steps tends to be most efficient. Identify Actors The actors represent users and external systems that will interact with the system under development.
Actors represent categories of users or external systems. One way to identify actors is to list the specific users that will use the system and then organize them into categories based on their role or the purpose they have for using the system. Less obvious actors include system maintenance and admin personnel. Consider the task of finding actors for a software system which simulates a virtual mall.