State Machine Diagram Chapter 5 Introduction Pages 122-132.

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

State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Objectives Detailed Object-Oriented Requirements Definitions
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.
1 CS 691z/791z Topics in Software Engineering Chapter 13: Activity Diagrams & Chapter 19: Basic Statecharts [Arlow and Neustadt, 2002] March 8, 2007.
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
1 CS/CPE 426 Senior Projects Chapter 21: State Machines Chapter 22:Advanced State Machines [Arlow and Neustadt 2005] March 24, 2009.
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.
Systems Analysis and Design in a Changing World, 6th Edition
Detailed Object-Oriented Requirements Definitions
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.
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.
State Machine Diagram Chapter 10. State Machine Diagram Used to describe system behavior.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
State Diagrams / System Sequence Diagrams (SSDs)
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
Systems Analysis and Design in a Changing World, 6th Edition
Behavioral diagrams Lecture p4 T120B pavasario sem.
Y2 eProjects Session 4 – Advanced Topics. Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Behavioral Modeling Chapter 8.
1 A Student Guide to Object- Oriented Development Chapter 7 State Diagrams.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Information System Design IT60105
Software Engineering Design & Modeling Statechart Diagram.
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.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
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.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
State Chart diagram Week objective Describe State chart Diagrams in Dynamic Modelling 2.
 Engineering Quality Software.  Today o State Diagrams Jerry Kotuba SYST30009-Engineering Quality Software 2.
Scis.regis.edu ● CS-432: Modern Software Engineering Week 4 Dr. Jesús Borrego Lead Faculty, COS Regis University 1.
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 3: Introducing the UML
1 An Overview of UML. 2 The Unified Modeling Language UML is a graphical language used by software engineers to model software systems during development.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Identifying & Creating Use Cases – Part 2
State Machine Model.
State Machine Diagram.
PHÂN TÍCH THIẾT KẾ HƯỚNG ĐỐI TƯỢNG
Systems Analysis and Design With UML 2
Sequence Diagram.
Visit for more Learning Resources
State Machine Diagrams
Business System Development
CSC 422 Kutztown University Dr. Spiegel
UML Activity Diagrams & State Charts
States.
Object Oriented System Design
CS/CPE 426 Senior Projects
CS/CPE 426 Senior Projects
States.
CS 791Z State Machines & Advanced State Machines
Identifying & Creating Use Cases - Part 3
Information Systems Engineering
Appendix 3 Object-Oriented Analysis and Design
UML State Diagrams (Ch. 29)
Presentation transcript:

State Machine Diagram Chapter 5 Introduction Pages 122-132

Overview: The name of the diagram itself clarifies the purpose of the diagram and other details: It describes different states of a component in a system State-chart diagram is one of the 5 UML diagrams used to model the dynamic nature of a system: They describe the flow of control from one sta

History: UML 1.x it was called state chart diagrams UML 2 we call it state machine diagrams We will use the term interchangeably.. Objects have both Behaviour and State Some objects are more complicated than others, and developers can have difficulty understanding them.

Class Door: What describes a door? Behaviour: Type, like wood, steel, etc. Colour, like … Dimensions, like …. State, like Open, or Closed, or Locked! Behaviour: Leave it to you!

Describing ‘states’: Initial State Transition/Event Final/Exit State Open Closes door Close Lock door Lock Opens door Unlocks door Unlock

How many states? Open Closed Locked Unlocked? Let’s rethink the state ‘Unlock’: When a door is ‘Closed’ and ‘Locked’ and I ‘Unlock’ it, it is ‘Closed’! Doesn’t make sense to ‘Lock’ an ‘Open’ door?

Summary: A door can be in one of three states: Opened, closed, locked It can respond to the events: Open, close, lock and unlock Not all events are valid states: if a door is opened, you cannot lock it until it is closed Guard: if a door is open, it can only RESPOND to close, if the doorWay is Empty

Let’s Model this:

Recap/Transition: A transition is a progression from one state to another and will be triggered by an event that is either internal or external to the object. The notation for the labels on transitions is in the format: Transition (parameter, ..) [guard]/ action-expression.

Transition cont.: It is mandatory to indicate the event which causes the transition, such as open or cancelled. Guard conditions that must be true for the transition to be triggered, are optionally. Transitions are the result of the invocation of a method that causes an important change in state. Not all method invocations will result in transitions.

Transitions cont.: You can see that transitions are a reflection of your business rules. For example, you see that you can attempt to enrol a student in a course only when it is open for enrolment or full, and when a video is returned late, a fine or penalty will be imposed. You can have recursive transitions, also called self transitions, that start and end in the same state.

Event [guard / action A guard is a Boolean condition that must be TRUE in order for a transition to “fire” When an event occurs the guard conditions are checked, and if they are met, then the transition FIRES. An action is a procedural expression to be performed when the transition fires

Identify ALL States State Transition/event

Super States A state can be nested: A super state consists of more than one state A super state make it possible to view a state diagram at different levels of abstraction

“OR” super state When the super state is ON, only one of its sub states is ON

“AND” super state “Concurrent sub states”: When the super state is ON, all of its states are also ON

Discuss!!

Exercise

Video Rental State Transition/Event

Summary Object Oriented Analysis and development provides a way to define and model a system A development methodology combines software engineering processes and OOAD modeling But….. There is a steep learning curve. You must be prepared to exercise this method several times before you begin to become proficient!

Homework Read: Page 122 – 132 Study: page 129 – 130, Sale Item diagram Page 136, No 7