Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Use-Case Descriptions
Use-case diagrams are functional diagrams in that they portray the basic functions of the systemthat is, what the users can do and how the system should respond to the users actions Creating use-case diagrams is a two-step process: First, the users work with the project team to write text-based use-case descriptions; Second, the project team translates the use-case descriptions into formal use-case diagrams Use cases capture the typical interaction of the system with the systems users (end users and other systems). Each possible execution path through the use case is referred to as a scenario The key thing to remember is that each use case is associated with one and only one role that users have in the system
An overview use case is used to enable the analyst and user to agree on a high-level overview of the requirements A detail use case typically documents, as far as possible, all the information needed for the use case An essential use case is one that describes only the minimum essential issues necessary to understand the required functionality. A real use case goes further and describes a specific set of steps
The use-case ID number provides a unique way to find every use case and also enables the team to trace design decisions back to a specific requirement The primary actor is usually the trigger of the use casethe person or thing that starts the execution of the use case The brief description is typically a single sentence that describes the essence of the use case The importance level can be used to prioritize the use cases A use case may have multiple stakeholders that have an interest in the use case Each use case typically has a trigger the event that causes the use case to begin A trigger can be an external trigger, such as a customer placing an order or the fire alarm ringing, or It can be a temporal trigger, such as a book being overdue at the library or the need to pay the rent Relationships Use-case relationships explain how the use case is related to other use cases and users There are four basic types of relationships: association, extend, include, and generalization
An association relationship documents the communication that takes place between the use case and the actors that use the use case An extend relationship represents the extension of the functionality of the use case to incorporate optional behavior An include relationship represents the mandatory inclusion of another use case. The include relationship enables functional decompositionthe breaking up of a complex use case into several simpler ones The generalization relationship allows use cases to support inheritance
First, write each individual step in the form subjectverbdirect object and, optionally, preposition indirect object Second, make clear who or what the initiator of the action is and who the receiver of the action in each step is Third, write the step from the perspective of an independent observer Fourth, write each step at the same level of abstraction Fifth, ensure that the use case contains a sensible set of actions The sixth guideline is the KISS principle. If the use case becomes too complex and/or too long, the use case should be decomposed into a set of use cases The seventh guideline deals with repeating steps
Actors
The labeled stick figures on the diagram represent actors An actor is not a specific user, but instead is a role that a user can play while interacting with the system An actor can also represent another system in which the current system interacts A specialized actor (i.e., new patient) can be placed on the model, shown using a line with a hollow triangle at the end of the more general actor (i.e., patient).
Association
Use cases are connected to actors through association relationships; these relationships show with which use cases the actors interact The association typically represents two-way communication between the use case and the actor
Use Case
A use case, depicted by an oval in the UML, is a major process that the system will perform that benefits an actor or actors in some way There are times when a use case includes, extends, or generalizes the functionality of another use case in the diagram There are times when a single use case contains common functions that are used by other use cases There are times when it makes sense to use a generalization relationship to simplify the individual use cases
Subject Boundary
The use cases are enclosed within a subject boundary, which is a box that defines the scope of the system and clearly delineates what parts of the diagram are external or internal to it
Second, the use cases are drawn on the diagram. These are taken directly from the detailed use-case descriptions. Third, the actors are placed on the diagram. The actors are taken directly from the primary actor element on the detailed use-case description The fourth and last step is to draw lines connecting the actors to the use cases with which they interact