SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.

Slides:



Advertisements
Similar presentations
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Advertisements

Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Activity Diagrams in UML. Definition Activity diagrams represent the dynamics of the system. They are flow charts that are used to show the workflow of.
Prof. Dr. Nizamettin AYDIN
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.
Introduction to Software Engineering 7. Modeling Behaviour.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
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.
Slide 1 Systems Analysis & Design CS183 Spring Semester Dr. Jonathan Y. Clark Course Website:
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
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.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Chapter 10 State Machine Diagrams
Class, Sequence and UML Model.  Has actors and use cases.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
State diagrams Interaction diagrams –Sequence diagrams –Collaboration diagrams Object orientation Part 4: Dynamic Modeling.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Systems Analysis and Design in a Changing World, 6th Edition
Behavioral diagrams Lecture p4 T120B pavasario sem.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
Behavioral Modeling Chapter 8.
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)
Information System Design IT60105
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CSE 403 Lecture 9 UML State Diagrams Reading:
Systems Analysis and Design in a Changing World, Fourth Edition
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
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.
Chapter 7 Behavioral Modeling Brandon A. Jones Stand and Deliver ITEC March 6, 2011.
UML Review: State Machines. Sept. 17, 2003Lecture 5: CS660 Fall Overview States Transitions Activities Modeling object lifeline Creating well-structured.
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
Appendix 3 Object-Oriented Analysis and Design
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
State Machine Diagrams
Activity and State Transition Diagram
State Machine Diagrams
Business System Development
CSE 403 Lecture 9 UML State Diagrams Reading:
States.
Object Oriented System Design
Week 12: Activity & Sequence Diagrams
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
States.
Software design and architecture
UML State Diagrams.
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26

Review UML behavioral Diagrams – Sequence diagram

Outline UML Behavioral Diagrams – State Machine Diagram Elements of a State Machine Diagram Creating a State Machine Diagram

State Machine Diagram Some of the classes in the class diagrams are quite dynamic in that they pass through a variety of states over the course of their existence. – For example, a vehicle can change over time from being “new” to “pre-owned,” on the basis of its status with the dealership.

State Machine Diagram A behavioral state machine diagram is a dynamic model that shows the different states that a single class passes through during its life in response to events, along with its responses and actions.

State Machine Diagram What objects are best used with state diagrams? – large, complex objects with a long lifespan – domain ("model") objects – not useful to do state diagrams for every class in the system!

State Machine Diagram Typically, behavioral state machine diagrams are not used for all classes, but just to further define complex classes to help simplify the design of algorithms for their methods. The behavioral state machine diagram shows the different states of the class and what events cause the class to change from one state to another.

State Machine Diagram In comparison to the sequence diagrams, behavioral state machine diagrams should be used if you are interested in understanding – the dynamic aspects of a single class and – how its instances evolve over time, and – not with how a particular use case scenario is executed over a set of classes.

Elements of a Behavioral State Machine Diagram State – A state is a set of values that describes an object at a specific point in time, – and it represents a point in an object’s life in which it satisfies some condition, performs some action, or waits for something to happen.

Elements of a Behavioral State Machine Diagram A state is depicted by a state symbol, which is a rectangle with rounded corners with a descriptive label that communicates a particular state.

Elements of a Behavioral State Machine Diagram States: – An initial state is shown by a small, solid, filled-in circle, and – An object’s final state is shown as a circle surrounding a small, solid, filled-in circle. The attributes or properties of an object affect the state that it is in; – however, not all attributes or attribute changes will make a difference.

Elements of a Behavioral State Machine Diagram Event – An event is something that takes place at a certain point in time and changes a value(s) that describes an object, which in turn changes the object’s state. – It can be a designated condition becoming true, – the receipt of the call for a method by an object, – or the passage of a designated period.

Elements of a Behavioral State Machine Diagram A transition – is a relationship that represents the movement of an object from one state to another state. A guard condition – is a Boolean expression that includes attribute values, which allows a transition only if the condition is true.

Elements of a Behavioral State Machine Diagram internal activity: – actions that the central object takes on itself – sometimes drawn as self-transitions (events that stay in same state) entry/exit activities – reasons to start/stop being in that state

Super/sub-states When one state is complex, you can include sub- states in it. – drawn as nested rounded rectangles within the larger state Caution: Don't over-use this feature. – easy to confuse separate states for sub-states within one state

Creating a Behavioral State Machine Diagram Behavioral state machine diagrams are drawn to depict a single class from a class diagram. Typically, the classes are very dynamic and complex, requiring a good understanding of their states over time and events triggering changes.

Creating a Behavioral State Machine Diagram You should examine your class diagram to identify which classes will need to undergo a complex series of state changes and draw a diagram for each of them.

Creating a Behavioral State Machine Diagram Identify the States – The first step is to identify the various states that a selected tune will have over its lifetime. – This information is gleaned from reading the use case reports, talking with users, and relying on the requirements-gathering techniques

Creating a Behavioral State Machine Diagram Identify the Transitions – The next step is to identify the sequence of states that a selected object will pass through during its lifetime and – then determine exactly what causes each state to occur. – Place state figures on the diagram to represent the states and label the transitions to describe the events that are taking place to cause state changes.

Example – Customer Order 1. The customer adds items into the shopping cart. 2. The customer checks out and submits the purchase once he or she is finished. 3. The purchase is pending while payment is authorized. 4. The payment is approved. 5. The purchase is pending for final customer approval. 6. The customer confirms the purchase. 7. The download is released.

Example – Customer Order

Example - ATM software states

Concurrent Substates © Oscar Nierstrasz

Branching and Merging Entering concurrent states: – Entering a state with concurrent substates means that each of the substates is entered concurrently (one logical thread per substate). Leaving concurrent states: – A labelled transition out of any of the substates terminates all of the substates. – An unlabelled transition out of the overall state waits for all substates to terminate.

Summary UML Behavioral Diagrams – State Machine Diagram Elements of a State Machine Diagram Creating a State Machine Diagram