USE CASE Diagram: Eng. Diana Jouhari

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

USE CASE Diagram

Eng. Diana Jouhari


UML

The Unified Modeling Language is a modeling language that provide a


standard way to visualize the design of a system.

UML diagrams used to portray the behavior and structure of a


system, so Diagrams in UML can be classified as:
Structural Diagrams: Capture static aspects or structure of a system.

Behavior Diagrams: Capture dynamic aspects or behavior of the system.


Hierarchy of diagrams according
to UML
Diagram

Behavior Structure
Diagram Diagram

State
Activity Class Component Object
Machine
Diagram Diagram Diagram Diagram Diagram
Composite Deployment Package
Interaction Use Case
structure Diagram Diagram
Diagram Diagram Diagram
Profile
Diagram
Communication Interaction Sequence Timing
Diagram overview Diagram Diagram
Diagram
Use Case Concept
The use case diagram is UML’s notation for showing the relationships
among a set of use cases and actors

Use case is one way of representing system functionality.

Use case refers to

• A system’s behavior (functionality)

• A set of activities that produce some output.


Procedure for Systems use case

Step 1. Identify the business events and make an event table.

Step 2. Identify the use cases and produce a use case diagram
for the system.

Step 3. Write a use case narrative describing the system’s


response to each business event.
Use Cases Diagram
• A diagram representing system’s behavior

• Provides a global look of a system, it’s basic functionality (use


cases) and environment (actors).

• A use case is a model of a requirement.

• A use case name is a short phrase beginning with a verb.

• Each event corresponds to at least one use case.


Events and Use Cases
Event Use case

Department submits class Submit Department Class


schedule. Schedule.

Time to produce University Class Produce University Class


Schedule Schedule.

Student registers for classes. Register for Classes.

Time to produce Class Roster Produce Class Roster.


Identifying Actors
An actor is a person, organization, or system which interacts with a
system by sending messages to the system or receiving messages
from the system.

Actor triggers use case.


Types of Actors
• An initiating actor (primary) initiates a use case by initiating an
external event. Thus, initiating actors provide system inputs.

• A participating actor (secondary) is involved in a use case but does


not initiate it. Thus, participating actors receive system outputs.
Components of a Use Case
Diagram
Actor: A named stick figure
Actor

Use case: An oval containing


the use case name
Association between an initiating
actor and a use case: a line with a
stick arrowhead
Association between a participating
actor and a use case: a line
The system boundary or a subsystem
boundary may be shown as a rectangle.
Use Case Specification
Use case name:
Actors:
Description:
Preconditions:
Postconditions:
Actor action: System Response:

Flow of Events: 1.
2.
3.
Alternative flow:
Associations Between Use Cases
The «includes» association always occurs when the use case which
includes it occurs.

a standard case linked to an mandatory use case.


Associations Between Use Cases
The occurrence of an «extends» association depends on a true
condition in the use case which it extends.

linking an optional use case to a standard use case.


Class registration
Online Shopping System
Online Shopping System
View cart Specification
Use case name: View cart
Actors: customer
Description: Allowing the user to view the meals he has chosen and their quantity in
order to modify the quantity, delete or add any meal before ordering
Pre-conditions: Cart not empty
Post-conditions: -
Actor action: System Response:
1. Click view cart
2. Fetch customer cart
Flow of Events: 3. View customer added meal and
quantity

4. modify quantity or delete meals.


5. Update cart
Alternative flow: ----
Reorder old order Specification
Use case name: Reorder old order
Actors: customer
Description: Allowing the customer reorder one of his orders, with all its meal and their
quantity
Pre-conditions: The customer has previous requests on his profile
Post-conditions: fetch the order and put it in the cart as it is
Actor action: System Response:
1. Choose desired order
2. Fetch the order
Flow of Events: 3. View order meal and meal
quantity
4. modify quantity or delete meals.

5. Update cart
Alternative flow: ----
Home Work

You might also like