Software Engineering OO Analysis (Object-Behaviour Models)

Slides:



Advertisements
Similar presentations
Week 2 The Object-Oriented Approach to Requirements
Advertisements

System Sequence Diagrams
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.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
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.
Software Engineering OO Analysis (Object-Relationship and Object-Behaviour Models)
Chapter 8 Analysis Engineering Software Engineering: A Practitioner’s Approach by Roger S. Pressman.
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.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Embedded Systems Details. Object Model: Four main system objects or classes Controller object might be made up of several controllers is the brains of.
Systems Analysis and Design in a Changing World, Fourth Edition
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
SE 555 Software Requirements & Specification 1 Activity Diagrams.
1 SWE Introduction to Software Engineering Lecture 25 – Object-Oriented Design (Chapter 14)
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
Dynamic modeling using UML
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Object-Oriented Analysis
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
Chapter 7: The Object-Oriented Approach to Requirements
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Software Configuration Management
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Data Flow Diagrams.
Interaction diagrams Sequence and collaboration diagrams.
The Object-Oriented Approach to Requirements
Systems Analysis and Design in a Changing World, Fifth Edition
Software Engineering Object Oriented Analysis. Objectives 1.To outline an Object Oriented Analysis process and modelling language 2.To study the process.
Software Engineering Object-Oriented Analysis (Class Diagrams) James Gain
Software Engineering Summary James Gain
Object Oriented Analysis
7 Systems Analysis and Design in a Changing World, Fifth Edition.
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
Information System Design IT60105
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.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
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.
Requirement Engineering. Recap Flow Based Modeling DFDs CFDs Processing narratives Class-based Model How to select classes? How to find attributes and.
Software Requirements Engineering Elaboration Process Lecture-14.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
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.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
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.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
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.
Design Review.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 8 Analysis Engineering
Case Study -- Weather system
Activity and State Transition Diagram
Business System Development
Object-Oriented Analysis
Week 12: Activity & Sequence Diagrams
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
CHAPTER 2 Object-Oriented Modeling Using UML (Continued)
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Software Engineering OO Analysis (Object-Behaviour Models)

Objectives 1.To show the object-behaviour design process 2.To introduce the UML interaction and state diagram notations

Analysis = Process + Models ProcessModel Output 1. Elicit customer requirements and identify use-cases Use-Case Diagrams 2. Extract candidate classes, Identify attributes and methods, Define a class hierarchy Class Responsibility Collaborator (CRC) Cards 3. Build an object-relationship model (structural) Conceptual Class Diagram 4. Build an object-behaviour model (dynamic) Interaction and State Diagrams

Object-Behavioural Modelling lCRC and object-relationship model  static lObject-behaviour model  dynamic (function of specific events and time) lProcess: 1.Evaluate use-cases to understand the sequence of system interaction 2.Identify events that drive the interaction sequence and relate these to specific objects 3.Create an interaction diagram for each use-case 4.Build a state diagram for the system 5.Review model to verify accuracy and consistency

Event Identification lEvents occur whenever the system and an actor exchange information lEvents are boolean: not the information but the fact that information is or is not exchanged lExamine the use-case narratives for points of information exchange lSome events have an impact on the flow of control lNext allocate events to objects. Some will generate and other recognize events

Example: Event Identification lUse-Case Narrative:  The homeowner observes the control panel to determine if the system is ready for input. If the system is not ready, the homeowner must physically close window/doors so that the ready indicator is present [a not ready indicator implies that a sensor is open].  The homeowner uses the keypad to key in a four-digit password. The password is compared with the valid password stored in the system. If the password is incorrect, the control panel will beep once and reset itself for additional input. If the password is correct, the control panel awaits further action. lTypical Event:  homeowner uses the keypad to key in a four-digit password.  Event “password entered” transmitted between homeowner and control panel  Does not alter flow of control (but “password compared” does)

Interaction Diagrams lA model that describes how groups of objects collaborate in some behaviour lCaptures interaction in a single use case lTo look at a single object across many use cases employ state diagrams lWorks for a sequential process without conditional or looping behaviour lTwo flavours:  Sequence (emphasise the sequence of events)  Collaboration (use layout to indicate how objects are statically connected)

Sequence Diagrams lSequence models show the sequence of object interactions that take place  Objects are arranged horizontally across the top  Time is represented vertically so models are read top to bottom  Each object has a vertical life-line representing its period of existence  Interactions (events) are represented by labelled arrows. Different styles of arrow represent different types of interaction  A thin rectangle in an object lifeline represents the time when the object is the controlling object in the system

Example: Sequence Diagram Homeowner Control Panel System system ready enters password ready for activation/deactivation selects stay or away ready for next action initiates beep activate/deactivate sensors red light on request Object Life Line Active Event

Further Notation Further Notation ConstructDescriptionSyntax DeletionIndicates that an object has been terminated  Asynchronous Message Message that does not block the caller (which carries on with its own prcoessing) Return MessageReturn from a previous message (can be omitted) Self-CallA message that an object sends to itself

Control Information lOnly use these if they help with clarity lExamples: ConstructDescriptionSyntax ConditionA message is sent only when the condition is satisfied [condition] Iteration markerMessage is sent many times to multiple receiving objects *[iteration control] [sensor active] deactivate *[for all items] add

Further Example Transaction Transaction Coordinator new beInvalid  new Transaction Checker #1 Transaction Checker #2   fail Kill checker Kill

Collaboration Diagrams lObjects are shown as icons, arrows indicate messages and sequence is indicated by a decimal numbering scheme. lOtherwise similar to sequence diagrams lExample: Homeowner Control Panel System 1: enters password 1.2: ready for (de)activation 2: selects stay or away 2.3: ready for next action 1.1: initiates beep 2.1: activate/deactivate sensors 2.2: red light on request

State Diagrams lObjects can be either:  passive (current status of attributes)  active (status as it undergoes a continuous transformation) lState diagrams concentrate on the active states of a single event-driven object lAn event occurs to force an object to make a transition from one active state to another lEvents must be discrete rather than continuous lBegin with externally observable states. Later, you can refine these states into behaviours that are not evident from outside the system lState diagrams owe much to the theory of finite automota

Basic UML State Diagram stop /ctr := 0stop [user quits] Final State Done Ready Transition Initial Pseudostate Action Event State Guard

State Components lTransitions:  Three parts, all optional Event [Guard] / Action  Events (or triggers)  Guard is a logical condition returning “true” or “false”. Transition occurs only if the condition is true. Guards exiting a state must be mutually exclusive  Action represents a processes which occurs quickly and is not interruptible lStates:  Two parts, label and activity  Activity (with syntax do/activity) represents a process which is longer than a transition action and can be interupted Label do/activity

Example: Control Panel State At Rest Comparing Reenter Selecting Password entered [Compare password = correct] [Compare password = incorrect] activation successful [Compare password = correct]

Superstates lIf several states have the same transition (e.g. cancel) then a superstate can enclose them with a single transition lSubstates inherit the transitions of the superstate DispatchingWaitingChecking Cancelled Active

Static Conditional Branching lA graphical shortcut for convenient rendering of decision trees /sell [(value >= 100) & (value < 200)] /sell /sell [value >= 200] /sell /reject [value < 100] /rejectSellingSellingUnhappyUnhappy HappyHappy bid bid

Summary lState diagrams good at describing the behaviour of an object across several use-cases lInteraction diagrams useful for describing the behaviour of several objects in a single use case lUse each in situations for which it is most appropriate

Analysis the problem requirements elicitation build a prototype create analysis models develop Specification Review