IFS 410 Advanced Analysis and Design Week 14

  • Slides: 14
Download presentation
IFS 410: Advanced Analysis and Design Week 14: Activity Diagram & Interaction Diagrams 10/22/2021

IFS 410: Advanced Analysis and Design Week 14: Activity Diagram & Interaction Diagrams 10/22/2021

UML Techniques for OO Design Activity Diagram Communication (Collaboration) Diagram Sequence Diagram Package, Component,

UML Techniques for OO Design Activity Diagram Communication (Collaboration) Diagram Sequence Diagram Package, Component, Deployment Diagrams 10/22/2021 2

Activity Diagrams • Shows the conditional logic for the sequence of system activities needed

Activity Diagrams • Shows the conditional logic for the sequence of system activities needed to accomplish a business process • Clearly shows parallel and alternative behaviors • Can be used to show the logic of a use case 10/22/2021 3

Activity Diagram n n Focus on system behavior Model an object’s workflow during program

Activity Diagram n n Focus on system behavior Model an object’s workflow during program execution Model the actions the object will perform and in what order UML representation w Action state ( rectangle with its left and right sides replaced by arcs curving outwards) w Action order ( arrow with a stick arrowhead) w Initial state (solid circle) w Final state (solid circle enclosed in an open circle) 10/22/2021 4

Components of Activity Diagram 10/22/2021 5

Components of Activity Diagram 10/22/2021 5

Fig. 5. 30 | Activity diagram for a Balance. Inquiry object. 10/22/2021 6

Fig. 5. 30 | Activity diagram for a Balance. Inquiry object. 10/22/2021 6

Fig. 5. 31 | Activity diagram for a withdrawal transaction. 10/22/2021 7

Fig. 5. 31 | Activity diagram for a withdrawal transaction. 10/22/2021 7

When to Use Activity Diagrams Activity diagrams are useful when you want to describe

When to Use Activity Diagrams Activity diagrams are useful when you want to describe a behavior which is parallel, or when you want to show behaviors in several use-cases interact. Use Communication diagrams when you want to show objects collaborate to implement an activity diagram. Use a state (chart) diagram to show one object (attribute) changes during its lifetime. 10/22/2021 8

Interaction Diagrams n n Model interactions use UML Communication diagrams w Also called collaboration

Interaction Diagrams n n Model interactions use UML Communication diagrams w Also called collaboration diagrams w Emphasize which objects participate in collaborations n Sequence diagrams w Emphasize when messages are sent between objects 10/22/2021 9

A communication diagram Fig. 7. 26 | Communication diagram of the ATM executing a

A communication diagram Fig. 7. 26 | Communication diagram of the ATM executing a balance inquiry. 10/22/2021 10

Sequence diagrams n n Help model the timing of collaborations Lifeline w Dotted line

Sequence diagrams n n Help model the timing of collaborations Lifeline w Dotted line extending down from an object’s rectangle n n Represents the progression of time Activation w Thin vertical rectangle n 10/22/2021 Indicates that an object is executing 11

A Sequence Diagram Fig. 7. 28 | Sequence diagram that models a Withdrawal executing.

A Sequence Diagram Fig. 7. 28 | Sequence diagram that models a Withdrawal executing. 10/22/2021 12

Elements in Sequence Diagrams 10/22/2021 13

Elements in Sequence Diagrams 10/22/2021 13

Creating a Sequence Diagram 10/22/2021 14

Creating a Sequence Diagram 10/22/2021 14