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

OBJECT ORIENTED

DESIGN AND ANALYSIS


LECTURE # 8

Engr. Rida Ghafoor Hussain


Contact Information
2

 Instructor: Engr. Rida Ghafoor Hussain


Assistant Professor
Department Of Computer Science
FAST-NUCES (CFD)

 Email: rida.ghafoor@nu.edu.pk
 Office hours:

 Wednesday, 11:00 - 1:00 p.m


Course Information
3

 Course Name: Object Oriented Analysis And Design

 Course Code: CS309

 Course Link:
http://slate.nu.edu.pk/portal/site/FSDCS309FALL2016CS/page/FSD
CS309FALL2016CS-1300
4 Topics to Cover
 Use Cases
 Use case and Relationships

Engr. Ali Javed


An Introduction to Use Cases
5

 A use case describes a sequence of actions, performed


by a system, that yields a result of value to a user
 In other words, a use case describes a series of user
system interactions that help the user to accomplish something
 A use case diagram involves two elements
 Use cases
 Actor
 Mostly you will find that they are the users of the system
that modeling
 Actors are the people or systems that interact with the use
cases
Main Flow of Use Cases
Use Cases
7

 The idea of use cases to describe functional requirements was


introduced in 1986 by Ivar Jacobson[Jacobson92],a main
contributor to the UML and UP.
 Writing use cases –stories of using a system –is an excellent
technique to understand and describe requirements.
Use Cases
8

 A scenario: is a specific sequence of actions and interactions


between actors and the system under discussion (SuD);
 It is also called a use case instance.

 It is one particular story of using a system.

 A use case is a narrative documentation that describes the


sequence of events of an actor(an external agent) using a
system to complete a process
 They are stories or cases of using a system.

 They are not exactly requirements or functional


specifications, but they illustrate and imply requirements in
the stories they tell.
Reasons for Use Cases
9

 No information system exists in isolation


 Most systems interact with humans or other
automated that use the system for some purpose
systems (actors)
 Use Cases specify the behavior of the system
 Helps visualize the system
10
Use Cases
11

 Use Cases may have a diagram associated with


them, and a use case diagram is an easy way for
an analyst to discuss a process with a subject matter
expert(SME).

 But use cases are primarily text. The text is


important. The diagram is optional.
Use Case Notation
12

 Use case Notation:: A use case is represented by an


oval shaped icon or ellipse.

 The name of the use case can be written either


inside the ellipse but can also be placed
beneath it like:

Cash Withdrawal

Cash Withdrawal
Actor Notation
13

 Actor Notation:: In a use case diagram an


Actor is represented by a stick person like
symbol shown below

 The name of an Actor is written beneath it like:

Customer
Relationships in Use Case Diagram
14

 There are several types of relationships that may


appear on a use case diagram:
 An association between an actor and a use case

 An association between two use cases

 A generalization between two actors

 A generalization between two use cases


Relationships in Use Case Diagram
15

 An association between an actor and a use case


 Actors are connected to the use cases with which
they interact by a line that represents a relationship
between the use cases and actors

ATM Example
Relationships in Use Case Diagram
16

 An association between two use cases

 A use case can be associated with another use case, they can have the following
relationships,

 Generalization between use cases


 Include relationship between use cases
 Extend relationship between use cases
Relationships in Use Case Diagram
17

 An association between two Actors


 An Actor can be associated with another actor
through Generalization relationship

ATM Example
Relationships in Use Case Diagram
18

 A Generalization between two Use cases


 Sometimes it becomes apparent that there is
more than one version of a use case and
each has some actions in common and some that
are unique to each on
 In this case we can have a generalized use case

and its specialized version


19
POS system use case diagram
For any query Feel Free to ask
44

You might also like