Princess Nourah bint Abdulrahman University

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Advertisements

System Sequence Diagrams
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/20 Interaction Diagrams.
Drawing System Sequence Diagrams
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
Dynamic modeling using UML
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
SE-565 Software System Requirements More UML Diagrams.
Unified Modeling Language
SENG 403 SENG 403 – Winter  Brief introduction to SSD  Example (A sales systems (Cashier))  Example (Monopoly game) SENG 403 – Winter 2012.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
CS3773 Software Engineering
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Interaction diagrams Sequence and collaboration diagrams.
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Drawing System Sequence Diagrams
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Object Oriented Analysis and Design Sequence Diagrams.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 3: Introducing the UML
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
 The Sequence Diagram models the collaboration of objects based on a time sequence.  It shows how the objects interact with others in a particular scenario.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – continued Control Classes.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Systems Analysis and Design in a Changing World, Fourth Edition
Interactions.
Collaboration Diagrams
BTS430 Systems Analysis and Design using UML
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
Sequence Diagram.
OO Domain Modeling With UML Class Diagrams and CRC Cards
Behavioral Modeling.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
OO Domain Modeling With UML Class Diagrams and CRC Cards
Sequence Diagrams.
Princess Nourah bint Abdulrahman University
Object Oriented Analysis and Design
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
System Sequence Diagrams
Sequence Diagrams Lecture 6.
Classification of UML Diagrams
IMAT5205 Systems Analysis and Design
Week 12: Activity & Sequence Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Chapter 4 Sequence Diagrams
Presentation transcript:

Princess Nourah bint Abdulrahman University System Sequence Diagrams Collaboration Diagrams Chapter 7 Behavioral Diagrams: Princess Nourah bint Abdulrahman University College of Computer and Information Sciences Department of Computer Science Dr. Doaa Sami Khafaga

Objectives Describe the evolutionary approach for using sequence diagrams to complete class diagrams Introduce the syntax of sequence diagrams Explain how message are interleaved between objects to build sequence diagrams Software Engineering Behavioral Diagrams

Object behaviour modelling Interaction diagrams model how groups of object collaborate to perform some behavior Typically captures the behavior of a single use case Software Engineering Behavioral Diagrams

System Sequence Diagrams Software Engineering Behavioral Diagrams

System Sequence Diagrams A system sequence diagram illustrates events from actors to systems and the external response of the system. This activity occurs during the analysis phase of a development cycle; dependent on the creation of the use cases and identification of concepts. One diagram depicts one scenario.This is the main success scenario. Frequent or complex alternate scenarios could also be illustrated. A system is treated as a black box. SSD is often accompanied by a textual description of the scenario to the left of the diagram. Software Engineering Behavioral Diagrams

System sequence Diagrams Software Engineering Behavioral Diagrams

System Sequence Diagram (SSD) for a Use Case (UC) Software Engineering Behavioral Diagrams

Messages message sent from one object to another (method 42  An interaction between two objects is performed as a message sent from one object to another (method call, signal, e-mail).  A message is labeled with the message name.  There are two kinds of messages:  Synchronous: the caller/sender waits for return/replay (e.g. method call).  Asynchronous: the sender proceeds without waiting for a replay (e.g. e-mail).  The following means either of the above:  Return value optionally indicated using a dashed arrow with a label indicating the return value.

Sequence Diagrams (SD) Software Engineering Behavioral Diagrams

Sequence Diagrams (SD) Software Engineering Behavioral Diagrams

Sequence Diagram Syntax Software Engineering Behavioral Diagrams

Example of Sequence Diagram Software Engineering Behavioral Diagrams

Conditional Interaction 44  A message can include a guard, which signifies that the message is only sent if a certain condition is met. The guard is simply that condition between brackets

Conditional Interaction Cont. 45  If you want to show that several messages are conditionally sent under the same guard, you'll have to use an 'opt' combined fragment. The combined fragment is shown as a large rectangle with an 'opt' operator plus a guard, and contains all the conditional messages under that guard.

Repeated Interaction '*'symbol), it means that the message is sent 46  When a message is prefixed with an asterisk (the '*'symbol), it means that the message is sent repeatedly. A guard indicates the condition that determines whether or not the message should be sent (again). As long as the condition holds, the message is repeated

Repeated Interaction Cont. 47  If you want to show that multiple messages are sent in the same iteration, a 'loop' combined fragment can be used. The operator of the combined fragment is 'loop' and the guard represents the condition to control the repetition.

From Use Case to Sequence System Diagram How to construct an SSD from a use case: Draw System as black box on right side For each actor that directly operates on the System, draw a stick figure and a lifeline. For each System events that each actor generates in use case, draw a message. Optionally, include use case text to left of diagram. Software Engineering Behavioral Diagrams

Example: use cases to SSD Software Engineering Behavioral Diagrams

Request Appointment SD Software Engineering Behavioral Diagrams

Collaboration Diagrams Semantically equivalent to sequence diagrams. Objects are shown as icons, and can be placed anywhere on the page/screen. Sequence of message firings is shown by numbering the messages. Easier to depict object links and layout with collaboration diagrams; they’re also more compact. Easier to see sequence with sequence diagrams. Software Engineering Behavioral Diagrams

Collaboration Diagrams Software Engineering Behavioral Diagrams

Collaboration Diagrams A collaboration diagram describes a pattern of interaction among objects. Client Object Link Supplier Object It shows objects participating in the interaction by their links to each other and the :Client messages that they send to each other. :Supplier An object is represented in three ways: Objectname:Classname, Objectname, 1: PerformResponsibility and :Classname Message A link is a relationship among objects across which messages can be sent. In a collaboration diagram, a link is shown as a solid line between two objects. A link can be an instance of an association, or it can be anonymous – meaning that its association is unspecified. Software Engineering Behavioral Diagrams

Collaboration Diagrams A message is a communication between objects that conveys information with the expectation that activity will ensue. In collaboration diagrams, a message is shown as a labeled arrow placed near a link. This means that the link is used to transport, or otherwise implement the delivery of the message to the target object. The arrow points along the link in the direction of the target object (the one that receives the message). The arrow is labeled with the name of the message, and its parameters. Software Engineering Behavioral Diagrams

Collaboration Diagrams The arrow may also be labeled with a sequence number to show the sequence of the message in the overall interaction. Sequence numbers are often used in collaboration diagrams, because they are the only way of describing the relative sequencing of messages. (A message can be unassigned, meaning that its name is a temporary string that describes the overall meaning of the message, like //get_schedule(). You can later assign the message by specifying the operation of the message's destination object. The specified operation will then replace the name of the message. Frequently locked in upon further analysis Software Engineering Behavioral Diagrams

collaboration diagram notation Software Engineering Behavioral Diagrams

Example: Collaboration Diagrams Software Engineering Behavioral Diagrams

Example: Collaboration Diagrams This example shows the collaboration of objects to support the Request Appointment use case: Create a Schedule subflow. It is the “collaboration diagram equivalent” of the sequence diagram shown earlier. Software Engineering Behavioral Diagrams

Collaboration Diagrams Vs Sequence Diagrams Same information expressed in different ways… Collaboration Diagrams Show relationships in addition to interactions Better for visualizing patterns of collaboration Better for visualizing all of the effects on a given object Easier to use for brainstorming sessions Sequence Diagrams Show the explicit sequence of messages Better for visualizing overall flow Better for real-time specifications and for complex scenarios Software Engineering Behavioral Diagrams

Collaboration Diagrams Vs Object Diagrams A collaboration diagram without messages is also known as an object diagram. The relationships between objects are called links. An object diagram must be a valid instantiation of a static class diagram. Objects must have classes. Links between objects must be instances of associations between classes. Use this as a quick consistency check. Software Engineering Behavioral Diagrams