TIM 58 Chapter 6, continued: Behavioral Modeling

Slides:



Advertisements
Similar presentations
Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
Advertisements

Prof. Dr. Nizamettin AYDIN
1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
ZEIT2301 Design of Information Systems Behavioural Design: State Machines School of Engineering and Information Technology Dr Kathryn Merrick.
Chapter 6: Behavioral Modeling
Interaction Diagrams Activity Diagram State Machine Diagram
Systems Analysis and Design in a Changing World, Fourth Edition
Slide 1 Systems Analysis & Design CS183 Spring Semester Dr. Jonathan Y. Clark Course Website:
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Essentials of interaction diagrams Lecture 23 & 24.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
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.
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.
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.
Unified Modeling Language
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Activity Diagram. C-S 5462 Activity diagram a diagram that represents a sequence of activities similar to flow chart, used in 1960’s and 1970’s an activity.
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.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Wixom, and David Tegarden Chapter 8: Behavioral Modeling.
Behavioral Modeling Chapter 8.
Lecture 18: Object-Oriented Design – Interaction and State Diagrams Anita S. Malik Adapted from Schach (2004) Chapter 12.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
9-1 © Prentice Hall, 2007 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Behavioral Modeling Chapter 8
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Systems Analysis and Design in a Changing World, Fourth Edition
CS3773 Software Engineering Lecture 06 UML State Machines.
Interaction Diagram An interaction diagram is a graphical representation of interactions between objects. Sequence diagram: shows the sequence in which.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Wixom, and David Tegarden Chapter 8: Behavioral Modeling.
1 Kyung Hee University Interaction Diagrams Spring 2001.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Chapter 7 Behavioral Modeling Brandon A. Jones Stand and Deliver ITEC March 6, 2011.
Test Generation from UML Specifications Michael A. Gray American University Washington, DC.
1 Systems Analysis and Design Behavioral Modeling Chapter 8 (Last one before the Midterm!)
Systems Analysis and Design in a Changing World, Fourth Edition
Analysis Classes Unit 5.
Chapter 4: Business Process and Functional Modeling, continued
Interactions.
State Machine Model.
The Movement To Objects
Systems Analysis and Design with UML Version 2.0, Second Edition
State Machine Diagrams
PHÂN TÍCH THIẾT KẾ HƯỚNG ĐỐI TƯỢNG
COMP 2710 Software Construction Sequence Diagrams (cont.)
INFS 6225 Object-Oriented Analysis & Design
Object-Oriented Systems Analysis and Design Using UML
Behavioral Modeling.
Dynamic Modeling: Defining Classes
Princess Nourah bint Abdulrahman University
Princess Nourah bint Abdulrahman University
Week 12: Activity & Sequence Diagrams
Object Interaction Diagrams
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
CIS 375 Bruce R. Maxim UM-Dearborn
UML State Diagrams.
Chapter 4 Sequence Diagrams
Presentation transcript:

TIM 58 Chapter 6, continued: Behavioral Modeling

Sample Sequence Diagram

Building Sequence Diagrams Set the context Identify actors and objects that interact in the use-case scenario Set the lifeline for each object Add messages by drawing arrows Shows how they are passed from one object to another Include any parameters in parentheses Obvious return values are excluded Add execution occurrence to each object’s lifeline Validate the sequence diagram Ensures that it depicts all of the steps in the process

Communication Diagrams Depict the dependencies among the objects An object diagram that shows message passing relationships Emphasize the flow through a set of objects

Communication Diagram Syntax

Sample Communication Diagram

Building Communication Diagrams Set the context Identify objects, actors and associations between them Lay out the diagram Add the messages Validate the model

Behavioral State Machines Objects may change state in response to an event Different states are captured in this model Shows the different states through which a single object passes during its life May include the object’s responses and actions Example: patient states New patient—has not yet been seen Current patient—is now receiving treatment Former patient—no longer being seen or treated Typically used only for complex objects

Components of State Machines States—values of an object’s attributes at a point in time Events—the cause of the change in values of the object’s attributes Transitions—movement of an object from one state to another May include a guard condition to flag that a condition is true and allow the transition

State Machine Syntax

Sample State Machine An event is something that takes place at a certain point in time and changes value(s) that describe an object. This in turn causes a change in the state of the object. Examples of events include a condition becoming true, a receipt of a call fro a method by an object, and the passage of a designated period of time. An action is an atomic, non-decomposable process that cannot be interrupted. Actions are often modeled as if they are completed in zero time, and they are associated with a transition. An activity is a non-atomic, decomposable process that can be interrupted. Activities take a long period of time to complete, they can be started or stopped by actions, and they are associated with states.

Guidelines for Creating Behavioral State Machines Use only for complex objects Draw the initial state in the upper left corner Draw the final state in the bottom right corner Use simple, but descriptive names for states Look out for “black holes” and “miracles” Ensure guard conditions are mutually exclusive Ensure transitions are associated with messages and operations In the parlance of behavioral state machines, every event leads to a state transition. This is because events are defined as anything that changes a value which in turn describes the state of the behavioral state machine. In other words, transitions occur only as the result of an event. Specific types of events are as follows.   a) Data value change: a change in one of the data values that collectively describe the state of the object. For example, a patient transitions from “new” to “existing” after the first visit. b) Boolean condition: a Boolean test that is applied at a certain point. For instance, after a patient transitions to “existing” we may ask the question “is the patient insured?” which would lead to state changes based on billing policies. c) Time lapse: after a certain amount of time in a given state, the object may spontaneously change to a different state. For instance, a patient that is in state “inactive” (perhaps because he/she has no future appointments), may be removed from the system after 5 years.

Building a Behavioral State Machine Set the context Identify the states of the object Initial Final Stable states during its lifetime Lay out the diagram—use a left to right sequence Add the transitions Identify the triggers (events that cause the transition) Identify the actions which execute Identify the guard conditions Validate the model—ensure all states are reachable

CRUDE Analysis Helps to identify object collaborations Labels object interaction in 5 possible ways: Create—can one object create another? Read—can one object read the attributes of another? Update—can one object change values in another? Delete—can one object delete another object? Execute—can one object execute the operations of another? Utilizes a matrix to represent objects and their interactions Most useful as a system-wide representation

Sample CRUDE Matrix

Verifying & Validating Behavioral Models Actors must be consistent between models Messages on sequence diagrams must match associations on communication diagrams Every message on a sequence diagram must appear on an association in a communication diagram Guard conditions on a sequence diagram must appear on a communication diagram Sequence of messages must correspond to the top down ordering of messages being sent State transitions must be associated with a message on a sequence diagram Entries in a CRUDE matrix imply messages being sent all transitions contained in a behavior state machine must be associated with a message being sent on a sequence and communication diagram, and it must be classified as a (C)reate, (U)pdate, or (D)elete message in a CRUDE matrix

Summary Behavioral Models—provide a detailed view of how object collaborations support use-cases Interaction Diagrams Sequence diagrams Communication diagrams Behavioral State Machines—depicts the states of complex objects during its lifetime CRUDE Analysis—helps to identify potential collaborations Verifying & Validating behavioral models—ensures the completeness and consistency of the models