SlideShare a Scribd company logo
1 of 24
BY:
ALTAF HUSSAIN
MS(CSE), NUST
SSO. KRL
USE CASES
&
Use Case Diagram
INTRODUCTION
 No system exists in isolation. Every interesting system
interacts with human or automated actor that use that
system for some purpose, and those actors expect that
system to behave in a predictable way.
 A USE CASE specifies the behavior of a system or a part of a
system and is a description of a set of sequences of actions,
including variants, that a system performs to yield an
observable results of value to an actor.
USE CASEs & ACTORs
 We apply use cases to capture the intended behavior of the
system we are developing, without having to specify how that
behavior will be implemented.
 Use case provide a way for our developers to come to a
common understanding with your system’s end user and
domain experts.
 In addition use cases serve to help validate our architecture
and to verify our system as it evolves during development.
 As we implement the system, these use cases are realized by
collaborations whose elements work together to carry out
each use case.
USE CASEs & ACTORs
 A use case describes a set of sequences, in which each
sequence represents the interaction of the things outside the
system (its actor) with the system itself ( and its key
abstraction).
 These behaviors are in effect system-level functions that we
use to visualize, specify, construct and document the
intended behavior of our system during requirement
capturing and analysis.
 A use case represents the functional requirements of our
system as a whole
USE CASEs & ACTORs
 A use case involves the interaction of actors and the system.
 An actor represents a coherent set of roles that users of use
case play when interacting these use cases.
 Actor can be human or they can be automated systems.
 For example in modeling a bank, processing a loan involves,
among other things, the interaction of customer and loan
officer.
Use Case & Flow of Events
 A use case specify what a system (subsystem, class or
interface) does but it does not specify how it does it.
 Modeling use cases we try to keep clear the separation of
concerns between outside and inside view.
 We specify the behavior of a use case by describing a flow of
events in text clearly enough for an outsider to understand it
easily.
 Writing use cases, we specify the flow of events, we include
how and when the use case starts and ends, when the use case
interacts with the actors and what objects are exchanged, and
the basic flow and alternative flows of the behavior.
Example of Use Case & Flow of Events
 In the context of ATM system, consider the use case
ValidateUser.
 Main Flow of events:
 The use case starts when the system prompts the customer for a
PIN number. The Customer can now enter a PIN number via
keypad. The Customer commits the entry by pressing the Enter
button. The system then checks this PIN number to see if it is
valid. If the PIN number is valid, the system acknowledges the
entry, thus ending the use case.
 Exceptional Flow of events:
 The Customer can cancel a transaction at any time by pressing the
Cancel button, thus restarting the use case. No changes are made
to the Customer’s account.
Example of Use Case & Flow of Events
 Exceptional Flow of events:
 The Customer can clear a PIN number before committing it and
reenter a new PIN number.
 Exceptional Flow of events:
 If the Customer enters an invalid PIN number, the use case
restarts. If this happens three times in a row, the system cancel
entire transaction, preventing the Customer from interacting
with the ATM for 60 seconds.
 Use Cases can be specified in a number of ways, including
informal structured text (as in this example), formal
structured text (with pre- and post-conditions), and with
pseudo code.
Use Cases & Scenarios
 An interaction diagram includes collaboration and sequence
diagrams.
 Typically first we describe the flow of events for a use case in
text.
 As we refine our understanding of the system, we want to also
use interaction diagrams to specify these flows graphically.
 Typically we use one sequence diagram to specify the use
case’s main flow and variations of that diagram to specify a
use case’s alternate or exceptional flows.
Use Cases & Scenarios
 It is desirable to separate main versus alternate flows because a
use case describes a set of sequences, not just single sequence,
and it would be impossible to express all the details of an
interesting use case in just a single sequence.
 For example in a HR System, we might find a use case Hire
Employee. This general business function might have many
possible variations. we might hire a person from another
company (the most common scenario); we might transfer a
person from one division to another (common in international
companies); or we might hire a foreign national (which
involves its own special rule). So each of these variants can be
expressed in different sequence.
Use Cases & Scenarios
 Actually one use case (Hire Employee) describes a set of
sequences in which each sequence in the set represents one
possible flow through all these variations.
 Each sequence of a use case is called a Scenario.
 A scenario is a specific sequence of actions that illustrates
behavior.
 Scenarios are to use cases as instances are to classes, meaning
that a scenario is basically an instance of a use case.
 For each use case we will find primary scenario (which define
essential sequences) and secondary scenarios (which define
alternate sequences).
Organizing Use Cases
 We organize use cases by specifying generalization, include,
and extend relationships among them.
 We apply these relationships in order to factor common
behavior (by pulling such behavior from other use cases that it
includes) and in order to factor variants (by pushing such
behavior into other use cases that extend it).
 Generalization among use cases is like generalization among
classes. It means that the child use case inherits the behavior
and meaning of the parent use case; the child may add to or
override the behavior of its parent; and the child may be
substituted any place the parent appears (both parent or child
may have concrete instances).
Organizing Use Cases
 For example, in a banking system, we might have the use case
Validate User, which is responsible for verifying the identity of
the user.
 We might have its two specialized children of this use case
Check Password and Retinal Scan. Both of these behave like
Validate User and may be applied anywhere Validate User
appears, yet both of which add their own behavior (the former
by checking a textual password and the later by checking the
unique retina patterns of the user.
 Generalization is rendered as solid directed line with a large
open arrowhead, just like generalization among classes.
Organizing Use Cases
 An Include relationship between use cases means that the base
use cases explicitly incorporates the behaviors of another use
case at a location specified by base.
 The include use case never stands alone, but it is only
instantiated as a part of some larger base use case that includes
it.
 We can think of it as the base use case pulling the behavior
from the supplier use case.
 We might include relationship to avoid describing the same
flow of events several times, by putting the common behavior
in a common use case of its own (the use case that is included
by the base use case).
Organizing Use Cases
 An Extend relationship between use cases means that the base
use case implicitly incorporates the behavior of another use case
at a location specified indirectly by the extending use case.
 The base use case may stand alone, but under certain
conditions, its behavior may be extended by the behavior of
another use case.
 These base use case may be extended at certain point called the
extension points.
 We can think of extend as pushing the behavior to the base use
case. Extend relationship is used to model the part of use case
that the user may see as optional system function.
Organizing Use Cases
 Using Extend relationship we separate optional behavior from
mandatory one. Similarly we use it to model separate sub flow
that is executed only under given conditions.
Organizing Use Cases
Organizing use cases by extracting common behavior
(though include relationships) and distinguishing
variants (through extend relationship) is an important
part of creating simple, balanced, and understandable
set of use cases for a system.
USE CASE DIAGRAM
 Use Case Diagram is one of five diagrams in UML for modeling
the dynamic aspects of systems (Activity diagrams, Statchart
diagram, Sequence diagram, Collaboration diagram & four
other type of diagrams in UML for modeling dynamic aspects
of a system).
 Use case diagram show use cases, actors and their
relationships to model the context of a system, subsystems, or
a class or model the requirements of behavior of these
elements.
 Use Case diagram is central to model the behavior of a system.
USE CASE DIAGRAM…
 Suppose someone hands you a box. On one side of that box
there are some buttons and a small LCD panel. Moreover, the
box is nondescript; you are not even given with a hint about
how to use it. You could randomly punch buttons and see what
happens, but you would be hard to pressed to figure out what
that box does or how to use it properly unless you spent a lot of
trial-and-error time.
 Software intensive systems can be like that. If you are a user,
you might be handed an application and told to use it. If the
application follows normal conventions of operating system
you are use to, you might be able to get it to do something
useful after a fashion, but you’d never come to understand its
more complex & subtle behavior that way.
USE CASE DIAGRAM…
 Simply we apply use case diagram to visualize the behavior of a system
so that users can comprehend how to use that element and so that
developers can implement that element.
USE CASE DIAGRAM EXAMPLE
USE CASE DIAGRAM EXAMPLE
Last slide Use Case diagram show the context of a Credit Card
Validation System, with an emphasis on the actors that
surround the system. We will find Customer, of which there are
two kinds (Individual Customer and Corporate Customer).
These actors are the roles that human play when interacting
this system. In this context, there are also actors that represent
other institutions, such as Retail Institution (with which a
Customer performs a card transaction to buy an item or
service) and Sponsoring financial institution (which serves as
the clearinghouse for the credit card account). In the real
world, these later two actors are likely software intensive
systems themselves.
Questions…

More Related Content

What's hot

Intro to UML - Use Case diagrams
Intro to UML - Use Case diagramsIntro to UML - Use Case diagrams
Intro to UML - Use Case diagramsjsm1979
 
Use Case TABLE with Actors & Goals
Use Case TABLE with Actors & Goals Use Case TABLE with Actors & Goals
Use Case TABLE with Actors & Goals Putcha Narasimham
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction
Object-Oriented Analysis & Design (OOAD) Domain Modeling IntroductionDang Tuan
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case DiagramKumar
 
Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2Ramakant Soni
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
 
Use case modeling & analysis v 1
Use case modeling & analysis v 1Use case modeling & analysis v 1
Use case modeling & analysis v 1JIGAR MAKHIJA
 
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDjayashri kolekar
 
3. use cases
3. use cases3. use cases
3. use casesAPU
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
Software Engineering : OOAD using UML
Software Engineering : OOAD using UMLSoftware Engineering : OOAD using UML
Software Engineering : OOAD using UMLAjit Nayak
 

What's hot (20)

Uml use casediagrams assignment help
Uml use casediagrams assignment helpUml use casediagrams assignment help
Uml use casediagrams assignment help
 
Use Case Modeling
Use Case ModelingUse Case Modeling
Use Case Modeling
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
Usecase Presentation
Usecase PresentationUsecase Presentation
Usecase Presentation
 
Intro to UML - Use Case diagrams
Intro to UML - Use Case diagramsIntro to UML - Use Case diagrams
Intro to UML - Use Case diagrams
 
4b use-case analysis
4b use-case analysis4b use-case analysis
4b use-case analysis
 
Use Case TABLE with Actors & Goals
Use Case TABLE with Actors & Goals Use Case TABLE with Actors & Goals
Use Case TABLE with Actors & Goals
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
Use case modeling & analysis v 1
Use case modeling & analysis v 1Use case modeling & analysis v 1
Use case modeling & analysis v 1
 
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
 
3. use cases
3. use cases3. use cases
3. use cases
 
Uml
UmlUml
Uml
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Software Engineering : OOAD using UML
Software Engineering : OOAD using UMLSoftware Engineering : OOAD using UML
Software Engineering : OOAD using UML
 
Chapter 7 Use Case Model
Chapter 7 Use Case ModelChapter 7 Use Case Model
Chapter 7 Use Case Model
 

Viewers also liked

Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Dr Sukhpal Singh Gill
 
Use Case Diagram Templates by Creately
Use Case Diagram Templates by CreatelyUse Case Diagram Templates by Creately
Use Case Diagram Templates by CreatelyCreately
 
A&D - Use Case Diagram
A&D - Use Case DiagramA&D - Use Case Diagram
A&D - Use Case Diagramvinay arora
 
Ccmtptpm 02 gioithieurup
Ccmtptpm 02 gioithieurupCcmtptpm 02 gioithieurup
Ccmtptpm 02 gioithieurupNguyen Tran
 
PHP mysqlnd connection multiplexing plugin
PHP mysqlnd connection multiplexing pluginPHP mysqlnd connection multiplexing plugin
PHP mysqlnd connection multiplexing pluginUlf Wendel
 
Britecon2016 - Intro
Britecon2016 - IntroBritecon2016 - Intro
Britecon2016 - IntroPhil Reynolds
 
Introduction to Object Oriented Design
Introduction to Object Oriented DesignIntroduction to Object Oriented Design
Introduction to Object Oriented DesignComputing Cage
 
3D flow patterns at the river–aquifer interface - a case study at Cikapundung...
3D flow patterns at the river–aquifer interface - a case study at Cikapundung...3D flow patterns at the river–aquifer interface - a case study at Cikapundung...
3D flow patterns at the river–aquifer interface - a case study at Cikapundung...Dasapta Erwin Irawan
 
Mobile based Accounting and Business Management System
Mobile based Accounting and Business Management SystemMobile based Accounting and Business Management System
Mobile based Accounting and Business Management SystemAshim Sikder
 
Lecture #5 Data Communication and Network
Lecture #5 Data Communication and NetworkLecture #5 Data Communication and Network
Lecture #5 Data Communication and Networkvasanthimuniasamy
 
Introduction to the Business Management System
Introduction to the Business Management SystemIntroduction to the Business Management System
Introduction to the Business Management SystemDavid Olson
 
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...Spark Summit
 
Waterfall model in Software engineering
Waterfall model in Software engineeringWaterfall model in Software engineering
Waterfall model in Software engineeringEhtesham Mehmood
 
Online shop system use case diagram report
Online shop system use case diagram reportOnline shop system use case diagram report
Online shop system use case diagram reportMahan Gheib Khah Mashak
 
Voice based banking system
Voice based banking systemVoice based banking system
Voice based banking systemJal Pari
 

Viewers also liked (20)

Use case-diagrams
Use case-diagramsUse case-diagrams
Use case-diagrams
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
 
Use Case Diagram Templates by Creately
Use Case Diagram Templates by CreatelyUse Case Diagram Templates by Creately
Use Case Diagram Templates by Creately
 
A&D - Use Case Diagram
A&D - Use Case DiagramA&D - Use Case Diagram
A&D - Use Case Diagram
 
Ccmtptpm 02 gioithieurup
Ccmtptpm 02 gioithieurupCcmtptpm 02 gioithieurup
Ccmtptpm 02 gioithieurup
 
PHP mysqlnd connection multiplexing plugin
PHP mysqlnd connection multiplexing pluginPHP mysqlnd connection multiplexing plugin
PHP mysqlnd connection multiplexing plugin
 
A&D - UML
A&D - UMLA&D - UML
A&D - UML
 
Britecon2016 - Intro
Britecon2016 - IntroBritecon2016 - Intro
Britecon2016 - Intro
 
Introduction to Object Oriented Design
Introduction to Object Oriented DesignIntroduction to Object Oriented Design
Introduction to Object Oriented Design
 
3D flow patterns at the river–aquifer interface - a case study at Cikapundung...
3D flow patterns at the river–aquifer interface - a case study at Cikapundung...3D flow patterns at the river–aquifer interface - a case study at Cikapundung...
3D flow patterns at the river–aquifer interface - a case study at Cikapundung...
 
Mobile based Accounting and Business Management System
Mobile based Accounting and Business Management SystemMobile based Accounting and Business Management System
Mobile based Accounting and Business Management System
 
Lecture #5 Data Communication and Network
Lecture #5 Data Communication and NetworkLecture #5 Data Communication and Network
Lecture #5 Data Communication and Network
 
Use Case UML Diagram
Use Case UML DiagramUse Case UML Diagram
Use Case UML Diagram
 
Introduction to the Business Management System
Introduction to the Business Management SystemIntroduction to the Business Management System
Introduction to the Business Management System
 
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
 
Ooad
OoadOoad
Ooad
 
Waterfall model in Software engineering
Waterfall model in Software engineeringWaterfall model in Software engineering
Waterfall model in Software engineering
 
Online shop system use case diagram report
Online shop system use case diagram reportOnline shop system use case diagram report
Online shop system use case diagram report
 
Voice based banking system
Voice based banking systemVoice based banking system
Voice based banking system
 
Class diagram, use case and sequence diagram
Class diagram, use case and sequence diagramClass diagram, use case and sequence diagram
Class diagram, use case and sequence diagram
 

Similar to Lecture#04, use case diagram

Similar to Lecture#04, use case diagram (20)

Unit 3
Unit 3Unit 3
Unit 3
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case Diagrams
 
Use Case Analysis and Diagramming
 Use Case Analysis and Diagramming Use Case Analysis and Diagramming
Use Case Analysis and Diagramming
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
 
SAD06 - Use Case Diagrams
SAD06 - Use Case DiagramsSAD06 - Use Case Diagrams
SAD06 - Use Case Diagrams
 
Uc
UcUc
Uc
 
Lab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagramLab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagram
 
Use case Modeling
Use case ModelingUse case Modeling
Use case Modeling
 
SE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesSE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use Cases
 
1_Use-Case (1).pdf
1_Use-Case (1).pdf1_Use-Case (1).pdf
1_Use-Case (1).pdf
 
Use Cases
Use CasesUse Cases
Use Cases
 
Use Cases
Use CasesUse Cases
Use Cases
 
Module 2 17CS45
Module 2 17CS45Module 2 17CS45
Module 2 17CS45
 
Use Case Diagrams part4
Use Case Diagrams part4Use Case Diagrams part4
Use Case Diagrams part4
 
Unit 3 system models
Unit 3 system modelsUnit 3 system models
Unit 3 system models
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
Jar chapter 3
Jar chapter 3Jar chapter 3
Jar chapter 3
 
StructureofUseCases.pptx
StructureofUseCases.pptxStructureofUseCases.pptx
StructureofUseCases.pptx
 
Use Case Modeling In UML
Use Case Modeling In UMLUse Case Modeling In UML
Use Case Modeling In UML
 
3 interaction and_state_modeling
3 interaction and_state_modeling3 interaction and_state_modeling
3 interaction and_state_modeling
 

More from babak danyal

Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Socketsbabak danyal
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Javababak danyal
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the desbabak danyal
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systemsbabak danyal
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systemsbabak danyal
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systemsbabak danyal
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systemsbabak danyal
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systemsbabak danyal
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systemsbabak danyal
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systemsbabak danyal
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systemsbabak danyal
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signababak danyal
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systemsbabak danyal
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 

More from babak danyal (20)

applist
applistapplist
applist
 
Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Sockets
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Java
 
Tcp sockets
Tcp socketsTcp sockets
Tcp sockets
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the des
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systems
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systems
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systems
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systems
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systems
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systems
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signa
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systems
 
Lecture9
Lecture9Lecture9
Lecture9
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 

Recently uploaded

NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...ictsugar
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
Marketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent ChirchirMarketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent Chirchirictsugar
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?Olivia Kresic
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Seta Wicaksana
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis UsageNeil Kimberley
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyotictsugar
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Kirill Klimov
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 

Recently uploaded (20)

NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
Marketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent ChirchirMarketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent Chirchir
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyot
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 

Lecture#04, use case diagram

  • 1. BY: ALTAF HUSSAIN MS(CSE), NUST SSO. KRL USE CASES & Use Case Diagram
  • 2. INTRODUCTION  No system exists in isolation. Every interesting system interacts with human or automated actor that use that system for some purpose, and those actors expect that system to behave in a predictable way.  A USE CASE specifies the behavior of a system or a part of a system and is a description of a set of sequences of actions, including variants, that a system performs to yield an observable results of value to an actor.
  • 3. USE CASEs & ACTORs  We apply use cases to capture the intended behavior of the system we are developing, without having to specify how that behavior will be implemented.  Use case provide a way for our developers to come to a common understanding with your system’s end user and domain experts.  In addition use cases serve to help validate our architecture and to verify our system as it evolves during development.  As we implement the system, these use cases are realized by collaborations whose elements work together to carry out each use case.
  • 4. USE CASEs & ACTORs  A use case describes a set of sequences, in which each sequence represents the interaction of the things outside the system (its actor) with the system itself ( and its key abstraction).  These behaviors are in effect system-level functions that we use to visualize, specify, construct and document the intended behavior of our system during requirement capturing and analysis.  A use case represents the functional requirements of our system as a whole
  • 5. USE CASEs & ACTORs  A use case involves the interaction of actors and the system.  An actor represents a coherent set of roles that users of use case play when interacting these use cases.  Actor can be human or they can be automated systems.  For example in modeling a bank, processing a loan involves, among other things, the interaction of customer and loan officer.
  • 6. Use Case & Flow of Events  A use case specify what a system (subsystem, class or interface) does but it does not specify how it does it.  Modeling use cases we try to keep clear the separation of concerns between outside and inside view.  We specify the behavior of a use case by describing a flow of events in text clearly enough for an outsider to understand it easily.  Writing use cases, we specify the flow of events, we include how and when the use case starts and ends, when the use case interacts with the actors and what objects are exchanged, and the basic flow and alternative flows of the behavior.
  • 7. Example of Use Case & Flow of Events  In the context of ATM system, consider the use case ValidateUser.  Main Flow of events:  The use case starts when the system prompts the customer for a PIN number. The Customer can now enter a PIN number via keypad. The Customer commits the entry by pressing the Enter button. The system then checks this PIN number to see if it is valid. If the PIN number is valid, the system acknowledges the entry, thus ending the use case.  Exceptional Flow of events:  The Customer can cancel a transaction at any time by pressing the Cancel button, thus restarting the use case. No changes are made to the Customer’s account.
  • 8. Example of Use Case & Flow of Events  Exceptional Flow of events:  The Customer can clear a PIN number before committing it and reenter a new PIN number.  Exceptional Flow of events:  If the Customer enters an invalid PIN number, the use case restarts. If this happens three times in a row, the system cancel entire transaction, preventing the Customer from interacting with the ATM for 60 seconds.  Use Cases can be specified in a number of ways, including informal structured text (as in this example), formal structured text (with pre- and post-conditions), and with pseudo code.
  • 9. Use Cases & Scenarios  An interaction diagram includes collaboration and sequence diagrams.  Typically first we describe the flow of events for a use case in text.  As we refine our understanding of the system, we want to also use interaction diagrams to specify these flows graphically.  Typically we use one sequence diagram to specify the use case’s main flow and variations of that diagram to specify a use case’s alternate or exceptional flows.
  • 10. Use Cases & Scenarios  It is desirable to separate main versus alternate flows because a use case describes a set of sequences, not just single sequence, and it would be impossible to express all the details of an interesting use case in just a single sequence.  For example in a HR System, we might find a use case Hire Employee. This general business function might have many possible variations. we might hire a person from another company (the most common scenario); we might transfer a person from one division to another (common in international companies); or we might hire a foreign national (which involves its own special rule). So each of these variants can be expressed in different sequence.
  • 11. Use Cases & Scenarios  Actually one use case (Hire Employee) describes a set of sequences in which each sequence in the set represents one possible flow through all these variations.  Each sequence of a use case is called a Scenario.  A scenario is a specific sequence of actions that illustrates behavior.  Scenarios are to use cases as instances are to classes, meaning that a scenario is basically an instance of a use case.  For each use case we will find primary scenario (which define essential sequences) and secondary scenarios (which define alternate sequences).
  • 12. Organizing Use Cases  We organize use cases by specifying generalization, include, and extend relationships among them.  We apply these relationships in order to factor common behavior (by pulling such behavior from other use cases that it includes) and in order to factor variants (by pushing such behavior into other use cases that extend it).  Generalization among use cases is like generalization among classes. It means that the child use case inherits the behavior and meaning of the parent use case; the child may add to or override the behavior of its parent; and the child may be substituted any place the parent appears (both parent or child may have concrete instances).
  • 13. Organizing Use Cases  For example, in a banking system, we might have the use case Validate User, which is responsible for verifying the identity of the user.  We might have its two specialized children of this use case Check Password and Retinal Scan. Both of these behave like Validate User and may be applied anywhere Validate User appears, yet both of which add their own behavior (the former by checking a textual password and the later by checking the unique retina patterns of the user.  Generalization is rendered as solid directed line with a large open arrowhead, just like generalization among classes.
  • 14. Organizing Use Cases  An Include relationship between use cases means that the base use cases explicitly incorporates the behaviors of another use case at a location specified by base.  The include use case never stands alone, but it is only instantiated as a part of some larger base use case that includes it.  We can think of it as the base use case pulling the behavior from the supplier use case.  We might include relationship to avoid describing the same flow of events several times, by putting the common behavior in a common use case of its own (the use case that is included by the base use case).
  • 15. Organizing Use Cases  An Extend relationship between use cases means that the base use case implicitly incorporates the behavior of another use case at a location specified indirectly by the extending use case.  The base use case may stand alone, but under certain conditions, its behavior may be extended by the behavior of another use case.  These base use case may be extended at certain point called the extension points.  We can think of extend as pushing the behavior to the base use case. Extend relationship is used to model the part of use case that the user may see as optional system function.
  • 16. Organizing Use Cases  Using Extend relationship we separate optional behavior from mandatory one. Similarly we use it to model separate sub flow that is executed only under given conditions.
  • 17.
  • 18. Organizing Use Cases Organizing use cases by extracting common behavior (though include relationships) and distinguishing variants (through extend relationship) is an important part of creating simple, balanced, and understandable set of use cases for a system.
  • 19. USE CASE DIAGRAM  Use Case Diagram is one of five diagrams in UML for modeling the dynamic aspects of systems (Activity diagrams, Statchart diagram, Sequence diagram, Collaboration diagram & four other type of diagrams in UML for modeling dynamic aspects of a system).  Use case diagram show use cases, actors and their relationships to model the context of a system, subsystems, or a class or model the requirements of behavior of these elements.  Use Case diagram is central to model the behavior of a system.
  • 20. USE CASE DIAGRAM…  Suppose someone hands you a box. On one side of that box there are some buttons and a small LCD panel. Moreover, the box is nondescript; you are not even given with a hint about how to use it. You could randomly punch buttons and see what happens, but you would be hard to pressed to figure out what that box does or how to use it properly unless you spent a lot of trial-and-error time.  Software intensive systems can be like that. If you are a user, you might be handed an application and told to use it. If the application follows normal conventions of operating system you are use to, you might be able to get it to do something useful after a fashion, but you’d never come to understand its more complex & subtle behavior that way.
  • 21. USE CASE DIAGRAM…  Simply we apply use case diagram to visualize the behavior of a system so that users can comprehend how to use that element and so that developers can implement that element.
  • 22. USE CASE DIAGRAM EXAMPLE
  • 23. USE CASE DIAGRAM EXAMPLE Last slide Use Case diagram show the context of a Credit Card Validation System, with an emphasis on the actors that surround the system. We will find Customer, of which there are two kinds (Individual Customer and Corporate Customer). These actors are the roles that human play when interacting this system. In this context, there are also actors that represent other institutions, such as Retail Institution (with which a Customer performs a card transaction to buy an item or service) and Sponsoring financial institution (which serves as the clearinghouse for the credit card account). In the real world, these later two actors are likely software intensive systems themselves.