Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.

Slides:



Advertisements
Similar presentations
Presentation material is based on notes from Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 ECE.
Advertisements

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 12, 2001 Capturing.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
Dynamic Modeling. Dynamic Modeling with UML Interaction diagram –Dynamic behavior of a set of objects arranged in time sequence –Interaction between objects.
Chapter 5, Analysis: Dynamic Modeling
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Using UML, Patterns, and Java Object-Oriented Software Engineering Requirements Analysis (Part 2 – Dynamic Modeling)
System Modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Outline  Dynamic models  Sequence diagrams.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
© Copyright Eliyahu Brutman Programming Techniques Course.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Analysis: Dynamic Modeling TJSS luennot: Päivi Ovaska.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Requirements Analysis Document Template 1.Introduction.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Dynamic Modeling.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Functional Modeling.
Lecture 6 Requirement analysis Functional Modeling Object Modeling Dynamical Modeling Non-functional requirements Slides adopted from the book and lecture.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
1 Phases in Software Development Lecture Software Development Lifecycle Let us review the main steps –Problem Definition –Feasibility Study –Analysis.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering October 3, 2001 Analysis.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
UNB CS3013 Software Engineering II lectures adapted from Bernd Bruegge & Allen Dutoit, Object-Oriented Software Engineering: Conquering Complex and Changing.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
Prof. Dr. Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) O bject- O riented S oftware C onstruction Chapter 5, Requirements Analysis.
Approaching a Problem Where do we start? How do we proceed?
Chapter 7 System models.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Slide 1 System models. Slide 2 Objectives l To explain why the context of a system should be modelled as part of the RE process l To describe behavioural.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
1 Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 A Typical Example of Software Lifecycle Activities.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Why is Design so Difficult? Analysis: Focuses on the application domain Design: Focuses on the solution domain –The solution domain is changing very rapidly.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 5: Analysis Dynamic Modeling. Outline of the Lecture  Dynamic modeling  Sequence diagrams  State diagrams  Using dynamic modeling for the.
Bernd Bruegge and Allen Dutoit Requirements Process The requirements process consists of two activities: Requirements Elicitation: Definition of the system.
The Movement To Objects
Chapter 5, Analysis: Dynamic Modeling
Chapter 5, Analysis: Dynamic Modeling
Presentation transcript:

Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 2 Outline  Dynamic modeling  Sequence diagrams  State diagrams  Using dynamic modeling for the design of user interfaces  Analysis example  Requirements analysis document template

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 3 Dynamic Modeling with UML  Diagrams for dynamic modeling  Interaction diagrams describe the dynamic behavior between objects  Statecharts describe the dynamic behavior of a single object  Interaction diagrams  Sequence Diagram:  Dynamic behavior of a set of objects arranged in time sequence.  Good for real-time specifications and complex scenarios  Collaboration Diagram :  Shows the relationship among objects. Does not show time  State Charts:  A state machine that describes the response of an object of a given class to the receipt of outside stimuli (Events).  Activity Diagram:  Special type of statechart where all states are action states

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 4 Dynamic Modeling  Definition of dynamic model:  A collection of multiple state chart diagrams, one state chart diagram for each class with important dynamic behavior.  Purpose:  Detect and supply methods for the object model  How do we do this?  Start with use case or scenario  Model interaction between objects => sequence diagram  Model dynamic behavior of single objects => statechart diagram

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 5 What is an Event?  Something that happens at a point in time  Relation of events to each other:  Causally related: Before, after,  Causally unrelated: concurrent  An event sends information from one object to another  Events can be grouped in event classes with a hierarchical structure.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 6 Events hierarchy

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 7 Sequence Diagram  Relation to object identification:  Objects/classes have already been identified during object modeling  Objects are identified as a result of dynamic modeling  Heuristic:  An event always has a sender and a receiver. Find them for each event => These are the objects participating in the use case

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 8 Sequence Diagrams: How To  Layout:  1st column: Should correspond to the actor who initiated the use case  2nd column: Should be a boundary object  3rd column: Should be the control object that manages the rest of the use case  Creation:  Control objects are created at the initiation of a use case  Boundary objects are created by control objects  Access:  Entity objects are accessed by control and boundary objects,  Entity objects should never call boundary or control objects: This makes it easier to share entity objects across use cases and makes entity objects resilient against technology-induced changes in boundary objects.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 9 Sequence diagram for the ReportEmergency use case FieldOfficer Report EmergencyButton ReportEmergencyControl ReportEmergency Form Emergency Report press() create() submit() fillContents() submitReport() create()

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 10 Statechart Diagrams  Graph whose nodes are states and whose directed arcs are transitions labeled by event names.  Distinguish between two types of operations:  Activity: Operation that takes time to complete  associated with states  Action: Instantaneous operation  associated with events  associated with states (reduces drawing complexity): Entry, Exit, Internal Action  A statechart diagram relates events and states for one class  An object model with a set of objects has a set of state diagrams

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 11 State  An abstraction of the attribute of a class  State is the aggregation of several attributes a class  Basically an equivalence class of all those attribute values and links that do no need to be distinguished as far as the control structure of the system is concerned  Example: State of a bank  A bank is either solvent or insolvent  State has duration

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 12 UML Statechart Diagram Notation State2 State1 Event1(attr) [condition]/action entry /action exit/action do/Activity Also: internal transition and deferred events Event trigger With parameters Guard condition

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 13 Example of a StateChart Diagram Idle Collect Money coins_in(amount) / add to balance do: test item and compute change do: make change do: dispense item [change=0] [change>0] [item empty] [select(item)] [change<0] coins_in(amount) / set balance cancel / refund coins

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 14 Expanding activity “do:dispense item” do: move arm to row do: move arm to column do: push item off shelf Arm ready ‘Dispense item’ as an atomic activity: ‘Dispense item’ as a composite activity: do: dispense item [change=0] Arm ready

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 15 Dynamic Modeling of User Interfaces  Statechart diagrams can be used for the design of user interfaces  Also called Navigation Path  States: Name of screens  Graphical layout of the screens associated with the states helps when presenting the dynamic model of a user interface  Activities/actions are shown as bullets under screen name  Often only the exit action is shown  State transitions: Result of exit action  Button click  Menu selection  Cursor movements  Good for web-based user interface design

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 16 Let’s Do Analysis 1. Analyze the problem statement  Identify functional requirements  Identify nonfunctional requirements  Identify constraints (pseudo requirements) 2. Build the functional model:  Develop use cases to illustrate functionality requirements 3. Build the dynamic model:  Develop sequence diagrams to illustrate the interaction between objects  Develop state diagrams for objects with interesting behavior 4. Build the object model:  Develop class diagrams showing the structure of the system

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 17 Analysis: UML Activity Diagram Req. Elicititation Req. Analysis

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 18 Requirements Analysis Document Template 1.Introduction 2.Current system 3.Proposed system 3.1Overview 3.2Functional requirements 3.3Nonfunctional requirements 3.4Constraints (“Pseudo requirements”) 3.5System models Scenarios Use case model Object model Data dictionary Class diagrams Dynamic models User interface 4. Glossary

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 19 Section 3.5 System Model Scenarios - As-is scenarios, visionary scenarios Use case model - Actors and use cases Object model - Data dictionary - Class diagrams (classes, associations, attributes and operations) Dynamic model - State diagrams for classes with significant dynamic behavior - Sequence diagrams for collaborating objects (protocol) User Interface - Navigational Paths, Screen mockups

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 20 Section 3.3 Nonfunctional Requirements User interface and human factors Documentation Hardware considerations Performance characteristics Error handling and extreme conditions System interfacing Quality issues System modifications Physical environment Security issues Resources and management issues

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 21 Nonfunctional Requirements: Trigger Questions User interface and human factors  What type of user will be using the system?  Will more than one type of user be using the system?  What sort of training will be required for each type of user?  Is it particularly important that the system be easy to learn?  Is it particularly important that users be protected from making errors?  What sort of input/output devices for the human interface are available, and what are their characteristics? Documentation  What kind of documentation is required?  What audience is to be addressed by each document? Hardware considerations  What hardware is the proposed system to be used on?  What are the characteristics of the target hardware, including memory size and auxiliary storage space?

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 22 Nonfunctional Requirements (continued) Performance characteristics  Are there any speed, throughput, or response time constraints on the system?  Are there size or capacity constraints on the data to be processed by the system? Error handling and extreme conditions  How should the system respond to input errors?  How should the system respond to extreme conditions? System interfacing  Is input coming from systems outside the proposed system?  Is output going to systems outside the proposed system?  Are there restrictions on the format or medium that must be used for input or output?

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 23 Nonfunctional Requirements, ctd  Quality issues  What are the requirements for reliability?  Must the system trap faults?  Is there a maximum acceptable time for restarting the system after a failure?  What is the acceptable system downtime per 24-hour period?  Is it important that the system be portable (able to move to different hardware or operating system environments)?  System Modifications  What parts of the system are likely candidates for later modification?  What sorts of modifications are expected?  Physical Environment  Where will the target equipment operate?  Will the target equipment be in one or several locations?  Will the environmental conditions in any way be out of the ordinary (for example, unusual temperatures, vibrations, magnetic fields,...)?

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 24 Nonfunctional Requirements, ctd  Security Issues  Must access to any data or the system itself be controlled?  Is physical security an issue?  Resources and Management Issues  How often will the system be backed up?  Who will be responsible for the back up?  Who is responsible for system installation?  Who will be responsible for system maintenance?

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 25 Pseudo Requirements (Constraints)  Pseudo requirement:  Any client restriction on the solution domain  Examples:  The target platform must be an IBM/360  The implementation language must be COBOL  The documentation standard X must be used  A dataglove must be used  ActiveX must be used  The system must interface to a papertape reader

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 26 Summary In this lecture, we reviewed the construction of the dynamic model from use case and object models. In particular, we described: In particular, we described:  Sequence diagrams for identifying missing objects and operations.  Statechart diagrams for identifying missing attributes.  Definition of an event hierarchy. In addition, we described the requirements analysis document and its use when interacting with the client.