Dynamic modeling using UML

Slides:



Advertisements
Similar presentations
System Sequence Diagrams
Advertisements

Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
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.
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor, the one who initiates Each.
Systems Analysis and Design in a Changing World, Fourth Edition
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence 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.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
Object Collaborations. Objectives: Object Interaction (cont.) You will be able to:  Use sequence diagrams to detail object interactions.
Use Case Modeling.
SE-565 Software System Requirements More UML Diagrams.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Slide 1 Use Case Sequence Diagram. Slide 2 Interaction Diagrams l Interaction diagrams model the behavior of use cases by describing the way groups of.
Unified Modeling Language
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
CS3773 Software Engineering
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Interactions. 2 Objects communicate with each other by sending messages. Sending a message is another name for a member function call. –Some C++ examples.
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.
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
System Sequence Diagrams. Recap When to create SSD? How to identify classes/instances? Use case descriptions UML notations for SSD.
1 On to Object Design Chapter 14 Applying UML and Patterns.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
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.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
Interaction Diagram An interaction diagram is a graphical representation of interactions between objects. Sequence diagram: shows the sequence in which.
Chapter 3: Introducing the UML
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
1 Kyung Hee University Interaction Diagrams Spring 2001.
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.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
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
Collaboration Diagrams
UML SEQUENCE DIAGRAM.
UML Modeling Sequence diagram
Chapter 11: Collaboration Diagram - PART1
Sequence and Collaboration Diagrams
Sequence Diagrams.
Princess Nourah bint Abdulrahman University
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
Classification of UML Diagrams
Interaction diagrams.
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Ch5: Software Specification

Dynamic modeling using UML Static models: Dynamic models:

Interaction diagrams Purpose of an interaction diagram: Sequence diagrams Collaboration diagrams:

Uses of interaction diagrams Refinement of use cases Understand system dynamics

Notation for sequence diagrams Classifiers Objects (instances of classes) and classes. Arranged horizontally. Objects respond to messages by invocation of methods, while Classes respond to messages by invocation of static methods. Represented by a rectangle Objects have labels name: ClassName, where name is optional Objects with no name are called anonymous objects Classes have labels in the form ClassName aStudent:Student :Seminar

Notation for sequence diagrams (contd..) Actors: Communicate with objects Modeled using the stick figure Actors initiate, take active part in usage scenarios Labeled by ActorName

Notation for sequence diagrams Lifeline Denotes the life of an object during a sequence. Contains an X at the point at which the object is removed from the memory. In languages such as C++, where memory needs to be managed by the programmer a destroy method needs to be called Dotted vertical line below the class/object.

Notation for sequence diagrams Focus of control: Long narrow rectangle placed on top of a lifeline Denotes an object performing an action to fulfill a message

Notation for sequence diagrams Message: Conveys information from one object to another, or from an actor to an object, or from object to an actor. Represented by a horizontal arrow. Source and the target of the method are objects, message label is the signature of the method invoked in response to the message. If either the source or target is human actor, then the message is labeled with a brief text describing the information being communicated. Wish to enroll isEligible(aStudent)

Drawing sequence diagrams Place actors, objects, and classes that participate in the interaction at the top of the diagram, across the X-axis. Place messages the objects send and receive along the Y-axis, in order of increasing time from top to bottom.

Sequence diagrams (contd..) Object lifeline: Focus of control:

Basic sequence diagrams Object1:Class1 Object2:Class2 Messages Lifelines Activations

Basic sequence diagrams (contd..) Object1:Class1 Object2:Class2 Destroy

Basic sequence diagrams Object1:Class1 Object2:Class2 Return values (optional)

Basic sequence diagrams Object1:Class1 Object2:Class2 [Condition to exit] Repetition or a loop is depicted as a rectangle. Condition to exit is placed at the bottom of the rectangle.

Basic sequence diagrams Object1:Class1 Object2:Class2 Self Call

Basic sequence diagrams Object1:Class1 Object2:Class2 [Condition true] [Condition false] Messages can be sent conditionally Conditions can also be depicted on the sequence diagrams

Sequence diagram: Example :Computer :PrinterServer :Printer Print(File) Print(file)

Sequence diagram: Example :Computer :PrinterServer :Printer :Queue [Printer free] Print(File) Print(file) [Printer busy] Store(File)

Collaboration diagrams Displays object interactions organized around objects and their links to one another. Do not explicitly show the lifeline of an object Can show both create and destroy message Do not show the focus of control explicitly Each message’s sequence number can be an indicator Show how one object is linked to another

Collaboration Diagrams (contd..) Objects: Rectangles containing object signature Object signature consists of object name: object class Object name optional, starts with a lower case letter Class name (mandatory), starts with an upper case letter Objects connected by lines Actor symbol may appear Messages: Labeled like C and Java function calls Followed by round brackets, and can have parameters and return values Are followed by an arrow to show direction Messages may be numbered, starting from 1

Collaboration diagrams How to draw collaboration diagrams:

Collaboration diagrams: Example :Queue :Computer 1: Print(file) [Printer busy] 3. Store(file) :Printer :PrinterServer [Printer free] 2. Print(file)

Common uses Use sequence diagrams to model flows of control by time ordering Use collaboration diagrams to model flows of control by organization

Sequence & Collaboration Diagrams: Example For an item to be purchased, the Sales Assistant enters the name of the item on the screen. The system finds the item, and then determines the total stock available. The system then displays the item. Draw an UML Sequence and Collaboration diagram for the above usage scenario.

Sequence Diagram :SalesAssitant :ProcessOrderScreen :Item :StockItem Name of Item findItem(ItemName) getQuantity(itemNum) Display Results

Collaboration Diagram :ProcessOrderScreen 2.findItem(itemName) :Item 1. Enter item name 3.getQuantity(itemNum) :StockItem