SlideShare une entreprise Scribd logo
1  sur  8
Télécharger pour lire hors ligne
4/11/2011




                      State Diagram




Statechart Diagram
   The Statechart describes the life of an object in terms of
    the events that trigger changes in the object’s state.
   It identifies both the external events and internal events
    that can change the object’s state.
   Next, contrast the scope of the Statechart with that of the
    Sequence diagram. The scope of the Statechart is the
    entire life of an object. The scope of the Sequence
    diagram is a single scenario. Consequently, it is possible
    to derive a Statechart from the set of Sequence
    diagrams that use the object.




                                                                         1
4/11/2011




State Diagrams

   Depicts object behavior across use cases
   State: collection of values of attributes
   State-behavior relationship
       state is updated by some behavior carried out
   Notation
       States: rounded rectangles
       Arrows: state transitions
       Labels on Arrows: event/action/use case




Example 1:
Book in a Library System

         start
                                Reserved


                                      release
                  New       reserve
                                           borrow            Borrowed

                 activate                           return
                               Available




                                                                               2
4/11/2011




Defining Internal Events and Activities




When to Draw State Diagrams
   State diagrams are good at describing the
    behavior of an object across several use
    cases
   Use state diagrams only for those classes
    that exhibit interesting behavior, often the
    main classes of the system




                                                          3
4/11/2011




State Diagrams Help Complete
System Design
   State diagrams often reveal use cases
    overlooked in earlier analyses of the system
   State diagrams provide hints on which
    attributes are necessary for a given class




Package Diagrams
   Systems are often large
       Can be divided into subsystems
       In object-oriented contexts, subsystems are
        packages; packages are groups of classes
   Package diagrams depict
       grouping
       dependencies between packages




                                                             4
4/11/2011




Package Diagram Notation
   Folder: Package
   Dotted arrow between folders: dependency
    link
   Two variations
       Abbreviated: name in folder
       Detailed: name on folder tab, rectangles
        representing classes in folder area




    Every subsystem package must have at least one
    public interface (that is, at least one class with a public interface).




                                                                                     5
4/11/2011




  Package dependency




The dependency relationship means that at least one class in a package has
to communicate with at least one class in the other package.




                                                                                    6
4/11/2011




The Component Diagram
   The Component diagram models the physical
    implementation of the software.(Deployment diagram
    models the physical architecture of the hardware)
   The purpose of the Component diagram is to define
    software modules and their relationships to one another
   Each component is a chunk of code that resides in
    memory on a piece of hardware.
   Each component must define an interface, which allows
    other components to communicate with that component.
   The interface and the internal implementation of the
    component are encapsulated in the classes that make
    up the component.




Defining the Notation for Components
and Component Dependencies




                                                                     7
4/11/2011




Component stereotypes
   <<executable>>: A component that runs on a processor
   <<library>>: A set of resources referenced by an executable
    during runtime
   <<table>>: A database component accessed by an executable
   <<file>>: Typically represents data or source code
   <<document>>: A document such as a page inserted into a
    Web page
Component interfaces




                                                                         8

Contenu connexe

Similaire à State Diagram Notation and Examples

Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
Moeed SDA LAB2.pptx
Moeed SDA LAB2.pptxMoeed SDA LAB2.pptx
Moeed SDA LAB2.pptxUnknownCraft
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software EngineeringAmit Singh
 
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION IJCSEA Journal
 
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATIONELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATIONIJCSEA Journal
 
Elaborate Lexicon Extended Language with a Lot of Conceptual Information
Elaborate Lexicon Extended Language with a Lot of Conceptual InformationElaborate Lexicon Extended Language with a Lot of Conceptual Information
Elaborate Lexicon Extended Language with a Lot of Conceptual InformationIJCSEA Journal
 
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION IJCSEA Journal
 
R1x g02 enterprise architecture i
R1x g02 enterprise architecture iR1x g02 enterprise architecture i
R1x g02 enterprise architecture icairo university
 
Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)jhamiltoorion
 
Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASEbabak danyal
 
S W L Chapter 5
S W L  Chapter 5S W L  Chapter 5
S W L Chapter 5dmhall
 
S W L Chapter 5
S W L  Chapter 5S W L  Chapter 5
S W L Chapter 5dmhall
 
SWL Chapter 5
SWL Chapter 5SWL Chapter 5
SWL Chapter 5dmhall
 
ITP251 SWL 5
ITP251 SWL 5ITP251 SWL 5
ITP251 SWL 5dmhall
 
SWL Chapter 5
SWL Chapter 5SWL Chapter 5
SWL Chapter 5dmhall
 

Similaire à State Diagram Notation and Examples (20)

Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
Euclideus_Language
Euclideus_LanguageEuclideus_Language
Euclideus_Language
 
Moeed SDA LAB2.pptx
Moeed SDA LAB2.pptxMoeed SDA LAB2.pptx
Moeed SDA LAB2.pptx
 
Asse2001
Asse2001Asse2001
Asse2001
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
 
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATIONELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
 
Elaborate Lexicon Extended Language with a Lot of Conceptual Information
Elaborate Lexicon Extended Language with a Lot of Conceptual InformationElaborate Lexicon Extended Language with a Lot of Conceptual Information
Elaborate Lexicon Extended Language with a Lot of Conceptual Information
 
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
ELABORATE LEXICON EXTENDED LANGUAGE WITH A LOT OF CONCEPTUAL INFORMATION
 
01. design pattern
01. design pattern01. design pattern
01. design pattern
 
432
432432
432
 
R1x g02 enterprise architecture i
R1x g02 enterprise architecture iR1x g02 enterprise architecture i
R1x g02 enterprise architecture i
 
Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)
 
Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASE
 
S W L Chapter 5
S W L  Chapter 5S W L  Chapter 5
S W L Chapter 5
 
S W L Chapter 5
S W L  Chapter 5S W L  Chapter 5
S W L Chapter 5
 
SWL Chapter 5
SWL Chapter 5SWL Chapter 5
SWL Chapter 5
 
ITP251 SWL 5
ITP251 SWL 5ITP251 SWL 5
ITP251 SWL 5
 
SWL Chapter 5
SWL Chapter 5SWL Chapter 5
SWL Chapter 5
 

Dernier

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Dernier (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

State Diagram Notation and Examples

  • 1. 4/11/2011 State Diagram Statechart Diagram  The Statechart describes the life of an object in terms of the events that trigger changes in the object’s state.  It identifies both the external events and internal events that can change the object’s state.  Next, contrast the scope of the Statechart with that of the Sequence diagram. The scope of the Statechart is the entire life of an object. The scope of the Sequence diagram is a single scenario. Consequently, it is possible to derive a Statechart from the set of Sequence diagrams that use the object. 1
  • 2. 4/11/2011 State Diagrams  Depicts object behavior across use cases  State: collection of values of attributes  State-behavior relationship  state is updated by some behavior carried out  Notation  States: rounded rectangles  Arrows: state transitions  Labels on Arrows: event/action/use case Example 1: Book in a Library System start Reserved release New reserve borrow Borrowed activate return Available 2
  • 3. 4/11/2011 Defining Internal Events and Activities When to Draw State Diagrams  State diagrams are good at describing the behavior of an object across several use cases  Use state diagrams only for those classes that exhibit interesting behavior, often the main classes of the system 3
  • 4. 4/11/2011 State Diagrams Help Complete System Design  State diagrams often reveal use cases overlooked in earlier analyses of the system  State diagrams provide hints on which attributes are necessary for a given class Package Diagrams  Systems are often large  Can be divided into subsystems  In object-oriented contexts, subsystems are packages; packages are groups of classes  Package diagrams depict  grouping  dependencies between packages 4
  • 5. 4/11/2011 Package Diagram Notation  Folder: Package  Dotted arrow between folders: dependency link  Two variations  Abbreviated: name in folder  Detailed: name on folder tab, rectangles representing classes in folder area Every subsystem package must have at least one public interface (that is, at least one class with a public interface). 5
  • 6. 4/11/2011 Package dependency The dependency relationship means that at least one class in a package has to communicate with at least one class in the other package. 6
  • 7. 4/11/2011 The Component Diagram  The Component diagram models the physical implementation of the software.(Deployment diagram models the physical architecture of the hardware)  The purpose of the Component diagram is to define software modules and their relationships to one another  Each component is a chunk of code that resides in memory on a piece of hardware.  Each component must define an interface, which allows other components to communicate with that component.  The interface and the internal implementation of the component are encapsulated in the classes that make up the component. Defining the Notation for Components and Component Dependencies 7
  • 8. 4/11/2011 Component stereotypes  <<executable>>: A component that runs on a processor  <<library>>: A set of resources referenced by an executable during runtime  <<table>>: A database component accessed by an executable  <<file>>: Typically represents data or source code  <<document>>: A document such as a page inserted into a Web page Component interfaces 8