You are on page 1of 2

Use Case Diagrams Actors

• Used during requirements elicitation to • An actor models an external entity which


represent external behavior communicates with the system:
• Actors represent roles, that is, a type of – User
user of the system (represented by stick – External system
figure but not necessarily a human) – Physical environment
• Use cases represent a sequence of
interaction for a type of functionality • An actor has a unique name and an
(represented by ovals with a name) optional description.
• The use case model is the set of all use • Examples:
cases. It is a complete description of the – Passenger: A person in the train
functionality of the system and its – GPS satellite: Provides the system with GPS
environment coordinates

Use Case Scenario Use Case Example - 1


A use case scenario represents a class of Name: Purchase ticket
functionality provided by the system as an event
flow.
Participating actor: Passenger
A use case consists of:
• Unique name
Entry condition:
• Participating actors
• Entry conditions • Passenger standing in front of ticket distributor.
• Flow of events • Passenger has sufficient money to purchase ticket.
• Exit conditions
• Special requirements Exit condition:
• Passenger has ticket.

Use Case Example - 2 The <<extends>> Relationship - 1


Event flow: • <<extends>> relationships represent
1. Passenger selects the number of zones to be traveled. exceptional or seldom invoked cases.
2. Distributor displays the amount due. • The exceptional event flows are factored out
3. Passenger inserts money, of at least the amount due. of the main event flow for clarity.
4. Distributor returns change.
• Use cases representing exceptional flows can
5. Distributor issues ticket.
extend more than one use case.
• The direction of a <<extends>> relationship
• We also need to specify how to is to the extended use case
handle exceptional cases

1
The <<extends>> The <<includes>> Relationship - 1
Passenger Relationship - 2
• <<includes>> relationship represents
behavior that is factored out of the use
PurchaseTicket
case.
<<extends>>
<<extends>> • <<includes>> behavior is factored out for
reuse, not because it is an exception.
<<extends>>
TimeOut • The direction of a <<includes>>
OutOfOrder
<<extends>> relationship is to the using use case
(unlike <<extends>> relationships).
Cancel NoChange

The <<includes>> Use Case Diagrams: Summary


Relationship - 2
Passenger • Use case diagrams represent external
behavior
PurchaseMultiCard • Use case diagrams are useful as an
PurchaseSingleTicket
<<includes>> index into the use cases
<<includes>>
• Use case scenarios provide meat of
CollectMoney
<<extends>>
model, not the use case diagrams.
<<extends>>
• All use cases need to be described for
NoChange Cancel the model to be useful.

You might also like