OO Methodology Elaboration Iteration 3 – Part 2 Refining Models.

Slides:



Advertisements
Similar presentations
State Diagram 1. State diagram: Shows the behavior of one object. They describe all of the possible states that a particular object can get into and how.
Advertisements

UML State Machine Diagrams and Modeling
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
1-1 ROPES Rapid Object-Oriented Process for Embedded Systems.
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.
Interaction Diagrams Activity Diagram State Machine Diagram
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
Jerry Gao Ph.D.9/2001 The UML: Object-Oriented Modeling The Unified Modeling Language (UML) Instructor: Jerry Gao Ph.D. San Jose State University
Slide 10B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
1 © Wolfgang Pelz UML2 UML Part 3. 2 © Wolfgang Pelz UML2 Chapter Ten State Machine 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.
Use Case Modeling.
Advanced Behavioral Modeling
7M822 UML Interaction Diagrams 25 November 2010.
1 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2002] January 26, 2006.
SE-565 Software System Requirements More UML Diagrams.
An Introduction to Rational Rose Real-Time
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Slide 16B.51 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
Software Engineering 1 Object-oriented Analysis and Design Chap 29 UML State Machine Diagrams and Modeling.
NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.
Chapter 14. Activity Modeling for Transformational Systems
CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.
1 Object Oriented Analysis and Design with UML UNIT 3.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
Sequence & Statechart Diagrams Month Day, Year. Agenda Training Plan Overview Actors and Use Case Diagrams Sequence Diagrams Diagram Elements Evolution.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
UML Advanced Structural Modeling II
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
Relationships Relationships between objects and between classes.
Chapter 29 State Machine Diagrams 1CS6359 Fall 2011 John Cole.
UML Discussion on State Machines Perfectly static system is intensely uninteresting Because nothing ever happens.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
OO Methodology Elaboration Iteration 2 - Design Patterns -
Dynamic Models. Outline Dynamic Models Statecharts –States –Transitions –Composite states Interaction Diagrams –Sequence Diagrams The time order of interactions.
Software Engineering Lecture 8 Object-Oriented Analysis.
OO Methodology Elaboration Iteration 3 – Part 1 Refining Models.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
States.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
Elaboration Iteration 3 – Part 3 - Persistence Framework -
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
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.
UML Activity Diagrams.
Dynamic Models - Page L M.E. Fayad Lesson 30: Dynamic Models Object- Oriented Modeling & Application s.
Dr. Awais Majeed Object Oriented Design and UML.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
OO Methodology Elaboration Iteration 3 – Part 3 - More Design Patterns -
Sysc 3100 System Analysis and Design1 Summary of the course.
CHAPTER
Marlon Dumas Institute of Computer Science
Unified Modeling Language
Activity and State Transition Diagram
UML State Diagrams.
States.
Unified Modeling Language
Marlon Dumas Institute of Computer Science
States.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Modeling Behavior in Statechart Diagrams
Chapter 14. Activity Modeling for Transformational Systems
Presentation transcript:

OO Methodology Elaboration Iteration 3 – Part 2 Refining Models

2 Table of Contents Iteration 1 –Use-Case Model –Process Sale Use Case –Domain Model –Design Model Iteration 2 –GRASP: More Patterns for Assigning Responsibilities –Designing Use-Case Realizations with GoF Design Patterns Iteration 3 –Related Use Cases –Modeling Generalization –Refining the Domain Model –Modeling Behavior in Statechart Diagrams –Activity Diagrams –Designing the Logical Architecture with Patterns –Designing More Use-Case Realization with Paterns –Designing a Persistence Framework with Patterns

3 Using Packages to Organize the Domain Model Package –a general-purpose mechanism for organizing elements into groups –a package is a group of model elements and diagrams package and name space –every model element that is not part of another model element must be declared within exactly one namespace –the namespace containing the declaration of an element is said to be own the element –a package is general-purpose namespace that can own any kind of model element

4 Using Packages to Organize the Domain Model Package Dependencies –there exists at least one usage dependency between elements of the two packages (Usage Dependency) Visibility –private: are not available at all outside the containing package –public: available to importing packages and to descendants of the package –protected : available to specialized package of the containing package –nested package has access to any elements directly contained in outer packages –outer package must import the contained packages

5 Packages in NextGen POS Packages in Domain Model Core/Misc Package

6 Packages in NextGen POS Payments Package

7 Packages in NextGen POS Products Sales

8 Authorization Services Packages in NextGen POS

9 Modeling Behavior in Statechart Diagram Modeling Dynamic Behavior –Sequencing Diagram –Collaboration Diagram –Statechart Diagram –Activity Diagram Statechart Diagram –describe which states an object can have during its life cycle, and the behavior in those states, along with what events cause the state to change Events, States, and Transitions –an event is a significant or noteworthy occurrence e.g. a telephone receiver is taken off the hook –a state is the condition of an object at a moment in a time e.g. a telephone is in the state of being “idle” –a transition is a relationship between two states tht indicates that when an event occurs e.g. off hootransition from the idle to active state

10 Modeling Behavior in Statechart Diagram Subject of a Statechart Diagram –classes –use cases –etc. Use Case Statechart Diagrams –to describe the legal sequence of external system events handled by a system in the context of the use case

11 Modeling Behavior in Statechart Diagram Statechart Diagrams for Classes –useful for state-dependent objects with complex behavior –cf. state-independent objects –process control and telecommunication domains often have more state-dependent objects than business information systems Examples of State-Dependent Classes –use cases (viewed as types) –systems –stateful session –windows –controllers –transactions –devices –role mutators –etc.

12 Modeling Behavior in Statechart Diagram Additional Notations in Statechart –transition action and guard condition –state variable and activities within state On first floor do/moving to floor Moving up Idle timer=0 do/increase timer Moving Down do/moving to floor [timer = time-out]/go down(first floor) go up(floor) arrived go down(floor) arrived

13 Modeling Behavior in Statechart Diagram Nested States –a state allows nesting to contain substates –a substate inherits the transitions of its superstate

14 Modeling Behavior in Statechart Diagram Example Timeout do/play message DialTone do/play dialtone Invalid do/play message Dialing Connecting Busy do/play busytone Ringing do/play busytone Talking Idle dial digit(n) [incomplete] after(15sec) dial digit(n) [valid]/connect dial digit(n) [invalid] connected busy callee answers caller hang ups/ disconnect lift receiver Active

15 Modeling Behavior in Statechart Diagram Implementation –Conditional Logic (e.g. Case Statement) –State Pattern Example : Digital Watch Display Set HoursSet Minutes mode_ button mode_ button inc/h = h + 1 do/display current time do/display hours do/display minutes inc/m = m + 1 mode_button Watch h, m, state mode_button() inc() void mode_button() { switch (state ) { case DISPLAY:... case HOURS :... case MIN :... }

16 Modeling Behavior in Statechart Diagram Example : Digital Watch –Using State Pattern Watch h, m mode_button() inc() State mode_button() inc() Display mode_button() Sethours mode_button() inc() Sethours mode_button() inc()

17 Activity Diagrams Activity diagram –is a state machine in which all or most of the states are activity state or action states –shows a procedure or workflow –shows sequential and concurrent activities Activity diagrams may be used in various purpose –to capture the work to be performed in the implementation of an operation –to show how a set of related actions may be performed and how they will affect objects around them –to show how an instance of a use-case may be performed –to show how a business works in terms of workers, workflows, organization, and objects Elements –Actions –Transitions (guard-condition, send-clause, action) –Swimlanes –Objects –Signals

18 Activity Diagrams Example Set up order Assign seats Charge credit card Award member bonus Assign seats Debit account merge fork join branch [subscription] [member] [single order]

19 Activity Diagrams Swimlanes –groups activities with respect to who is responsible for them or where they reside in an organization Request Order Take Order Fill Order Pay Deliver Order Collect Order [placed] Order [delivered] Order [entered] Order [entered] CustomerSales Stockroom object and its state

20 Activity Diagrams Signals and Deferred Events –signal is a way of asynchronous communication between two objects –deferred event is an event whose occurrence must be deferred for later use while some other activities is underway Turn on Machine Get Cups light goes out/defer Pour Coffee turn on light goes out deferred event