state & activity diagrams
DESCRIPTION
State & Activity Diagrams. 1. State Diagram. State Diagram- Introduction. Use Cases, Class diagrams are used to give an architectural and high-level view of a system - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/1.jpg)
State & Activity Diagrams
![Page 2: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/2.jpg)
1. State Diagram
![Page 3: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/3.jpg)
State Diagram- Introduction
• Use Cases, Class diagrams are used to give an architectural and high-level view of a system
• The two diagrams named above are static diagrams, which means that they help in visualizing what the elements of the complete system would be, but do not say anything about the flows any object of the system can have when an event occurs.
• While coding, it is necessary to understand the details of the modes an Object of a Class can go through and its transitions at time intervals with the occurrence of any event or action.
![Page 4: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/4.jpg)
• State diagrams (also called State Chart diagrams) are used to help the developer better understand any complex/unusual functionalities or business flows of specialized areas of the system.
• In short, State diagrams depict the dynamic behavior of the entire system, or a sub-system, or even a single object in a system.
State Diagram- Introduction….
![Page 5: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/5.jpg)
![Page 6: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/6.jpg)
![Page 7: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/7.jpg)
![Page 8: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/8.jpg)
![Page 9: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/9.jpg)
Example 2: Order Management System-state diagram
![Page 10: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/10.jpg)
Example 3: Phone State
![Page 11: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/11.jpg)
![Page 12: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/12.jpg)
![Page 13: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/13.jpg)
2. Activity Diagram
![Page 14: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/14.jpg)
Activity Diagram• Activity diagrams represent the business and
operational workflows of a system. • An Activity diagram is a dynamic diagram that shows
the activity and the event that causes the object to be in the particular state.
• So, what is the importance of an Activity diagram, as opposed to a State diagram?
• A State diagram shows the different states an object is in during the lifecycle of its existence in the system, and the transitions in the states of the objects. WHILE an Activity diagram talks more about these transitions and activities causing the changes in the object states.
![Page 15: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/15.jpg)
Elements of an Activity Diagram
![Page 16: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/16.jpg)
Transition
![Page 17: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/17.jpg)
Creating an Activity DiagramExample 1: Consider the example of attending a course lecture.
![Page 18: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/18.jpg)
Example 2: activities involved in managing course information carried out by the course administrator in Courseware Management System
![Page 19: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/19.jpg)
Swim Lanes
![Page 20: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/20.jpg)
Example 3- create a receipt activity
![Page 21: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/21.jpg)
Swim Lanes example- create a receipt
![Page 22: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/22.jpg)
More examples on Activity diagrams
• Example 4: Withdraw cash in ATM machine
![Page 23: State & Activity Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062501/56816923550346895de055eb/html5/thumbnails/23.jpg)