You are on page 1of 13

Unit - 2

CSE307
Object Oriented Analysis & Design

Interaction Modeling
Usecase Model

1
Introduction
• The interaction model is the third leg of the
modeling tripod and describes interactions
within a system.
• The class model describes the objects in a
system and their relationships,
• The state model describes the life cycles of
the objects, and
• The interaction model describes how
objects interact to produce useful results.
2
Introduction
• Interactions can be modelled at different
levels of abstraction.
• Level1: Use case diagrams describe how
a system interacts with outside actors
(helpful for capturing informal
requirements).

3
USE CASE MODELS

• Use case diagram displays the relationship among actors and use
cases.
Actors:
Direct external user of system  an object or set of objects that
communicates directly with the system but not part of the system.
Actor can be persons , devices and other systems - anything that
interacts directly with the system
Entity that performs certain roles in a given system. EX - In a
banking application, a customer represents an actor. Similarly, the
person who provides service at the counter is also an actor.

name 4
 USE CASE name

 represents a piece of functionality that a system provides to


its user
 Each use case involves one or more actors as well as the
system itself
 A sequence of messages among the system and its actor.
 Error conditions are also part of a use case
 A use case includes normal flow, abnormal flow, exception
conditions, error conditions and cancellation of a request.
 To identify use cases, list the discrete functions the user might
do in order to complete an action.
 For a banking application it might be:
 deposit money ,withdraw money
5
Use Case Summaries

6
Use Case Description: Buy a beverage

7
USE CASE DIAGRAM
 A system involves a set of use cases and set of actors.
 Each use case shows single functionality of system provides
 Set of use case shows complete functionality
 Each actor represents one kind of object for which system
can perform behavior.
 Set of actor represents complete set of object that system
can serve.

8
Use Case diagram for a vending machine

9
GUIDELINES FOR USE CASE MODELS

 The following guidelines may be considered to


prepare a right use-case model:

1. FIRST DETERMINE SYSTEM BOUNDARY : - it is


impossible to identify use case or actors if the system
boundary is unclear

10
GUIDELINES FOR USE CASE MODELS

2.ENSURE THAT ACTORS ARE FOCUSED :- Each actor


should have a single purpose.
 Ex- owner of personal computer may install s/w, set
up DB, send email.
 these functions differ in their impact on computer
system and potential for system damage.
 they might be broken into three actors: system
administrator, database administrator & computer
user

11
3.EACH USE CASE MUST PROVIDE VALUE TO USERS:
 represents a complete transaction that provide some
value to user & should not defined too narrowly.
 EX:- Dial Phone no. is not a good use case for telephone
system it does not represents complete transaction.
 the part use case involves call, talking & terminating
the call.

12
4.RELATE USE CASE & ACTOR
 Every use case should have at least one actor & every
actor should participate in at least one use case.
 A use case may involve several actors & actor may
participate in several use cases

5.USE CASE CAN BE STRUCTURED


 For many applications, individual use cases are
completely distinct.
 For large system use case can be built out of smaller
Fragments using relationships

13

You might also like