Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.

Slides:



Advertisements
Similar presentations
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Advertisements

UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Interaction Diagrams Activity Diagram State Machine Diagram
Software Engineering COMP 201
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Activity, Collaboration, and Component Diagrams Philip Liew
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Essentials of interaction diagrams Lecture 23 & 24.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
State Change Modelling. Aim: To introduce the concept and techniques for describing the changes in state that may occur to an object in its lifetime.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Lab 6 CPIT 250 System Analysis and Design.
Modern Systems Analysis and Design Fifth Edition Jeffrey A
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
SE-565 Software System Requirements More UML Diagrams.
An Introduction to Rational Rose Real-Time
Unified Modeling Language
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
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
Class, Sequence and UML Model.  Has actors and use cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Interaction diagrams Sequence and collaboration diagrams.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
1 On to Object Design Chapter 14 Applying UML and Patterns.
1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
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.
© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
Sequence Diagrams CSIS3600. Sequence Diagrams A sequence diagram shows an interaction arranged in time sequence. In particular, it shows the objects participating.
Use Case realization How classes collaborate to realize use cases or system functionality.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
 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.
More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.
Chapter 7 Behavioral Modeling Brandon A. Jones Stand and Deliver ITEC March 6, 2011.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
System modeling and the Unified Modeling Language (UML) CS
Systems Analysis and Design in a Changing World, Fourth Edition
UML Diagrams By Daniel Damaris Novarianto S..
State Machine Model.
Unified Modeling Language
Object-Oriented Systems Analysis and Design Using UML
Communication DIAGRAM
UML Diagrams Jung Woo.
Dynamic Modeling: Defining Classes
Sequence Diagrams.
UML Activity Diagrams & State Charts
Week 12: Activity & Sequence Diagrams
Interaction diagrams.
Communication DIAGRAM
Presentation transcript:

Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams

Dynamic Modelling Static Model Express the static structure of a system including the classes, objects, and their relationships. Dynamic Model Express the behaviour of a system to demonstrate how the object interact dynamically at different times during the execution of the system. –control information –the sequences of events, –States and operations that occur within a system of objects, –usually involving the time dimension.

Dynamic Modelling Objects communicate with each other by sending messages to each other. A message is an operation call that one object invokes in another object. The way objects communicate and the effects of the communication are referred to as the dynamics of the system. –How objects collaborate through communication –How objects change state

UML Dynamic Models Communication among objects is called interaction. Can be described by 3 types of diagram: –Sequence Diagram: Shows how a sequence of messages are sent and received between objects. Focus is time. –Collaboration Diagram: Focus on the relationships between objects. –Activity Diagram: describes the activities of objects and their order.

UML Dynamic Models There is another dynamic model in UML that examines the interactions between objects from a single object’s point of view. State Diagram: describes which states an object can have during its lifecycle, and the behaviour in those states, along with what events cause the state to change; for example, and invoice can be paid (state paid) or unpaid (state unpaid).

Message Passing How are messages passed between objects?

Message Types Synchronous - invoked operation completes before control returns to caller. Asynchronous - caller continues processing while call is outstanding. Simple - Shows control passing between objects but without indicating precise mechanism involved.

State Diagram

All objects have a state. The state is the result of the previous activity performed by the object. The state is determined by the value of its attributes and links to other objects. An object changes state when something happens – called an event.

State Diagram Show how objects react to events and how they change their internal state. Has a starting point and can have several end points.

Components of a State Diagram l Event l something that happens at a point in time. An event has no duration. For example, received messages, time-outs, error exceptions. l State l an abstraction of the attribute values and links of an object l Activity l an operation that takes time to perform l closely associated with a state l Action l an operation performed on a state change

State Diagram State 2... State 1 do/activity 1 event [condition] /action name of event which causes transition an action that is performed when the event occurs a pre-condition before a transition occurs Starting point An end point (there can be several end points)

Relationships between State Diagram & Class Diagram A state diagram relates to ONE class within a class diagram. The received events are often messages that will have originated at one of the other classes with which the class in question has a relationship. Events are basically received messages and are therefore handled by a receiving class operation. Actions - happening upon a state transition - are usually class operations that may result in a message being sent to another object. Activities - happening within a particular class state - are usually class operations.

A State Diagram Example Passive Monitor do/ check detectors Detected do/ ring bell flash lights Alarm System access code typed in Intruder alert/ phone police correct access code typed in [30 seconds passed]

Another Example

Nested State Diagram State diagrams for an object may be nested, allowing the control mechanism to be viewed at different levels of abstraction. A nested state diagram is a form of generalisation on states.

Nested State Diagram OFF intruder detected active sensing passive sensing Alarm System Controller on power on power off code detect code Alarm time out On State diagram of alarm system controller with generalisation

Sequence Diagram

Illustrate how objects interact with each other. Has two axis: –Vertical shows time –Horizontal shows objects Reveals the interactions for a specific scenario.

Sequence Diagram :Control Unit :Sensor Intruder House Holder Switch On Valid Access Code Entry Police Person detected :Timer Start Invalid Access Code Timeout Notify activation lifeline X

Sequence Diagram Example

Collaboration Diagram

Like the sequence diagram the collaboration diagram show the interactions between objects. The sequence focuses on time, while the collaboration diagram focuses on ‘space’ (meaning the interactions and links between collaborating objects). Use a collaboration diagram when the objects and their links facilitate understanding the interaction. Use a sequence diagram when only the sequence needs to be shown.

Collaboration Diagram Consider the Class Diagram for the burglar alarm scenario: Control Unit Timer Sensor monitors signals 1 1..* Uses 1 1..*

Collaboration Diagram Example :Control Unit :Timer :Sensor InfraRed 1:person_detected() 1.1:Start()

Sequence & Collaboration Diagrams Sequence diagram emphasises Time. Collaboration diagram emphasises Interaction superimposed on links. –Clearer connection with the UML class diagram Both diagram types can be used to depict the execution of a Use-case.

Activity Diagram

UML Activity Diagram Capture actions and their results. Can place actions in swimlanes. A swimlane groups activities, with respect to who is responsible for them. Can be used to: –Capture work that will be performed when an operation is executing. –Show how a set of related actions may be performed an how they will affect objects around them. –Show how an instance of a use case may be performed –Show how a business works in terms of workers (actors), workflows, organisations, and objects.

Activity Diagram Notation An identified action or activity A decision branch An object either input to, or output from an action Signal Receipt - for receiving info. (usually from an object) Signal Send - denoting a signal being sent to an object

Activity Diagram Example Determine Closing Date and Interview Dates Job Start Date Manager [sufficient time] [insufficient time] Notify Job Spec. Advert [Create] Consider the recruitment Use-case introduced earlier in the course. The recruitment process could be described by the following activity diagram:

Activity Diagram

Consistency!! Ensure that all dynamic models are consistent with each other. Ensure that all dynamic models can be realised from the static models.