Usecase Digram

Only available on StudyMode
  • Topic: Unified Modeling Language, Class diagram, Use case
  • Pages : 14 (3752 words )
  • Download(s) : 12
  • Published : April 20, 2013
Open Document
Text Preview
Tutorial - Building a Use Case Diagram
1. Introduction
A Use Case diagram is a graphical representation of the high-level system scope. It includes use cases, which are pieces of functionality the system will provide, and actors, who are the users of the system. Looking at a Use Case diagram, you should easily be able to tell what the system will do and who will interact with it.

You can create one or more Use Case diagrams for a single system. If you create more than one, each will show a subset of the actors and/or use cases in the system. You can also group the use cases and actors into packages to help organise the model. Α Use Case diagram can be helpful in communicating with the end users of the system. It is designed to be straightforward and non-technical so that everyone on the team can come to a common understanding of the system scope. It is usually created by the technical team, but in conjunction with an end user representative.

To create a new Use Case diagram: 1. Right-click a package in the Use Case view. 2. Select New → Use Case Diagram. A Use Case diagram shows a subset of the use cases and actors in the system. You can create as many Use Case diagrams as you need to fully document the system scope.

2. Actors
An actor is a person, system, piece of hardware, or other thing that interacts with your system. It is denoted with a stick figure. We differentiate active actors, who initiate interactions with a system, and passive actors, who are targets of requests or who are activated by the system.

1

Follow these steps to add actors to the diagram: 1. Determine the actors for your system. 2. Select the Actor toolbar button. 3. Click in the Use Case diagram to add the actor. 4. Name the actor.

3. Use cases
A use case is a piece of functionality the system will provide. It is usually named in the format , such as "Deposit Check" or "Withdraw Cash." Use cases are highlevel and implementation-independent. It is denoted with a horizontal ellipse:

Follow these steps to add use cases to the diagram: 1. Determine the use cases of the diagram. 2. Select the Use Case toolbar button. 3. Click in the Use Case diagram to add the use case. 4. Give the use case a name.

4. Relationships
4.1 Communicates relationship A communicates relationship between an actor and a use case indicates that the actor initiates the use case. An actor may initiate one or more use cases.

To add relationships between the actors and use cases: 1. Select the Unidirectional Association toolbar button. 2. Drag an arrow from the actor to the use case.

Example: Consider the following requirements of a flight booking and hotel reservation system. A customer can purchase a ticket for a flight without having to book a hotel. They also have the opportunity to reserve a hotel room or change a reservation without

2

having to book a flight. Finally, they can hire a rental car for their holiday. Create a simple Use Case diagram for the above problem.

4.2 Includes relationship An includes relationship suggests that one use case must include another. In other words, running one use case means that the other must be run as well. One use case may be included by one or more other use cases. It is denoted by a dashed unidirectional arrow from the source use case(s) to the target use case.

To add includes relationships between appropriate use cases: 1. Select the Dependency or instantiates toolbar button. 2. Drag an arrow from a use case to the use case it includes. 3. Double-click the arrow. 4. Assign the stereotype as include.

4.3 Extends relationship An extends relationship is used when one use case optionally extends the functionality provided by another. In other words, if one use case runs, an extending use case may or may not run.

To add extends relationships between appropriate use cases: 1. Select the Dependency or instantiates toolbar button. 2. Drag an arrow from the extending use case to the use case it...
tracking img