Princess Nourah bint Abdulrahman University

Slides:



Advertisements
Similar presentations
System Sequence Diagrams
Advertisements

ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
ZEIT2301 Design of Information Systems Behavioural Design: State Machines School of Engineering and Information Technology Dr Kathryn Merrick.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/20 Interaction Diagrams.
Object-Oriented Analysis and Design
Drawing System Sequence 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
LECTURE 5 SEQUENCE DIAGRAM 1. INTRODUCTION – SYSTEM SEQUENCE DIAGRAM A system sequence diagram is a fast and easily created artifact that illustrates.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
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.
1 On to Object Design Chapter 14 Applying UML and Patterns.
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
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.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
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.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – continued Control Classes.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
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
UML Diagrams By Daniel Damaris Novarianto S..
Interactions.
Collaboration Diagrams
The Movement To Objects
BTS430 Systems Analysis and Design using UML
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
Object-Oriented Systems Analysis and Design Using UML
OO Domain Modeling With UML Class Diagrams and CRC Cards
UML Diagrams Jung Woo.
Behavioral Modeling.
Object-Orientated Analysis, Design and Programming
Business System Development
UML dynamic Modeling (Behavior Diagram)
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
UML Activity Diagrams.
OO Domain Modeling With UML Class Diagrams and CRC Cards
Sequence Diagrams.
Princess Nourah bint Abdulrahman University
How do we convince people that in programming simplicity and clarity —in short: what mathematicians call "elegance"— are not a dispensable luxury, but.
Sequence Diagrams Lecture 6.
Classification of UML Diagrams
Unified Modeling Language
Week 12: Activity & Sequence Diagrams
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Use Case Analysis – continued
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix 3 Object-Oriented Analysis and Design
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

Message type in a sequence diagram Simple:This is a transfer of control from one object to another. Synchronous: If an object sends a synchronous message, it waits for an answer to that message before it proceeds with its business. Asynchronous: If an object sends an asynchronous message, it doesn't wait for an answer before it proceeds. Software Engineering Behavioral Diagrams

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

SSD for Process Sale scenario Software Engineering Behavioral Diagrams

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

Statecharts Class diagrams describes static structure of a system. Interaction diagrams describe the behaviour of a collaboration. How about describing the behaviour of a single object when it reacts to messages? Statecharts Statecharts describe all possible states that an object can get in to, and how the object responds to events. Software Engineering Behavioral Diagrams

Software Engineering Behavioral Diagrams

Software Engineering Behavioral Diagrams

Software Engineering Behavioral Diagrams

Statecharts A statechart diagram is a directed graph.The nodes of the graph represent states, and the arrows represent transitions between states caused by external events. Semantically this diagram says that if the current state of statechart machine M is STATE1, then when EVENT1 occurs, and if guard1 is true, then actions effect1 and effect2 will be performed and the current state will become STATE2. Upon entering STATE2, M will perform action1 and action2. While the current state is STATE2, M continually performs action3. Upon exiting STATE2, action4 will be performed Software Engineering Behavioral Diagrams

Example Software Engineering Behavioral Diagrams

Example Software Engineering Behavioral Diagrams

When to Use Statecharts They are good at describing the behaviour of an object across several scenarios of use. They are not good at describing behaviour that involves a number of collaborating objects (use interaction diagrams for this). Not usually worthwhile to draw a statechart for every class in the system. Use them only for those classes that exhibit interesting behaviour. Software Engineering Behavioral Diagrams