1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.

Slides:



Advertisements
Similar presentations
SEQUENCE DIAGRAM. UML diagrams There are many ways of organizing the UML diagrams. Can be organized as the fallowing: 1. Structural diagrams: to show.
Advertisements

Chapter 4,Use Case and Statechart Diagrams
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Chapter 2, Modeling with UML, Part 2
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor, the one who initiates Each.
Lecture 5 …a bit more about UML Sequence diagrams Collaboration diagrams State-chart diagrams CRC cards.
Interaction Diagrams Software Engineering BIT8. Interaction Diagrams  A series of diagrams describing the dynamic behavior of an object-oriented system.
Requirements Engineering Processes
Systems Analysis and Design in a Changing World, Fourth Edition
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 UML Sequence Diagrams  Used during system.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Dynamic modeling using UML
Using UML, Patterns, and Java Object-Oriented Software Engineering Modeling with UML Chapter 2 Object-Oriented Software Engineering: Using UML, Patterns,
SE-565 Software System Requirements More UML Diagrams.
Blaha and Rumbaugh Sections 7.2 and 8.2
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Chapter 7: The Object-Oriented Approach to Requirements
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Interaction diagrams Sequence and collaboration diagrams.
1 Behavioral diagrams (2) Lecture p5 T120B pavasario sem.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
Chapter 2, Modeling with UML, Part 2
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Copyright © Hsiao-Lan Wei All Rights Reserved Design Model Interaction diagram.
Starting Object Design
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
UML Review of diagram types. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
Interaction Diagram Notation
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
Introduction to UML 임현승 강원대학교 Revised from the slides by Bernd Bruegge and Allen H. Dutoit for the book “Object-Oriented Software Engineering: Using UML,
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Review Overview: modeling with UML  What is modeling?  What is UML?  Use case diagrams  Class diagrams  Sequence diagrams  Activity diagrams.
CEN 5011 Advanced Software Engineering
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
1 Kyung Hee University Interaction Diagrams Spring 2001.
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.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Chapter 2, Modeling with UML
UML Review.
UML Diagrams By Daniel Damaris Novarianto S..
EKT 421 SOFTWARE ENGINEERING
Chapter 11: Collaboration Diagram - PART1
Sequence and Collaboration Diagrams
Sequence Diagram.
Communication DIAGRAM
UML Diagrams Jung Woo.
UML dynamic Modeling (Behavior Diagram)
Requirements To Design In This Iteration
Interaction diagrams.
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
Communication DIAGRAM
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class diagrams Dynamic modeling –Interaction Diagrams Sequence diagrams Collaboration diagrams –State diagrams (activity diagrams) Describe the static structure of the system

2 Dynamic Modeling with UML Two UML diagrams types for dynamic modeling: –Interaction diagrams describe the dynamic behavior between objects –Statechart diagrams describe the dynamic behavior of a single object. Purpose: –Detect and supply operations for the object model.

3 UML Interaction Diagrams Two types of interaction diagrams: –Sequence Diagram: Describes the dynamic behavior of several objects over time Good for real-time specifications –Collaboration Diagram: Shows the temporal relationship among objects Position of objects is based on the position of the classes in the UML class diagram. Does not show time,

4 UML State Chart Diagram State Chart Diagram: –A state machine that describes the response of an object of a given class to the receipt of outside stimuli (Events). Activity Diagram: –A special type of state chart diagram, where all states are action states (Moore Automaton). Classes without interesting dynamic behavior are not modeled with state diagrams

5 Collaboration Diagrams Message1() :Class A instance MyB: B instance

6 Sequence Diagram Message1() :Class A instanceMyB: B instance

7 Sequence Diagram Properties UML sequence diagram represent behavior in terms of interactions Useful to identify or find missing objects Time consuming to build, but worth the investment Complement the class diagrams (which represent structure).

8 Interactive Diagrams Notations Class Instance Message expression –Return:= name (param: param type): return type Link (in collaboration diagrams): –A connection path between 2 objects where multiple messages flow –Put messages ordered by numbers and have arrows to show their direction Class Name :Class NameC1:Class Name

9 How do we detect Operations? Good starting point: Flow of events in a use case description From the flow of events we proceed to the sequence diagram to find the participating objects. –An event always has a sender and a receiver Find them for each event => These are the objects participating in the use case.

10 What is an Event? Something that happens at a point in time An event sends information from one object to another Events can have associations with each other: –Causally related: An event happens always before another event An event happens always after another event –Causally unrelated: Events that happen concurrently

11 Flow of events in “Sale process” use case : 6. The controller Finds Item ID from the product catalog 7. The controller Gets item price from the product description 8. The controller Calculate subtotal in the SaleLineItem Where are the objects? An Example

12 Sequence Diagram for “Sale Process” GetPrice () price CalSubTotal() ControllerProduct Catalog Product description FindItem (ID) 6. The controller Finds Item ID from the product catalog 7. Get item price from the product description 8. Calculate subtotal in the SaleLineItem. time SaleLine Item

13 Sequence Diagrams Used during analysis –To refine use case descriptions –to find additional objects (“participating objects”) Used during system design –to refine subsystem interfaces Instances are represented by rectangles. Actors by sticky figures Lifelines are represented by dashed lines Messages are represented by arrows Activations are represented by narrow rectangles. selectZone() pickupChange() pickUpTicket() insertCoins() TicketMachine Passenger Focus on Controlflow Messages -> Operations on participating Object zone2price selectZone() insertCoins() pickupChange() pickUpTicket() TicketMachine

14 Execution Specification Sequence diagram: Basic Notation Sequence diagrams represent the behavior of a system as messages (“interactions”) between different objects. Lifeline Message

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15 Lifeline and Execution Specification A lifeline represents an individual participant (or object) in the interaction A lifeline is shown using a symbol that consists of a rectangle forming its “head” followed by a vertical line (which may be dashed) that represents the lifetime of the participant An execution specification specifies a behavior or interaction within the lifeline An execution specification is represented as a thin rectangle on the lifeline.

16 Sequence Diagrams can also model the Flow of Data The source of an arrow indicates the activation which sent the message Horizontal dashed arrows indicate data flow, for example return results from a message Passenger selectZone() ZoneButtonTarifScheduleDisplay lookupPrice(selection) displayPrice(price) price Dataflow …continued on next slide...

17 Sequence Diagrams: Iteration & Condition Iteration is denoted by a * preceding the message name Condition is denoted by boolean expression in [ ] before the message name Passenger ChangeProcessor insertChange(coin) CoinIdentifierDisplayCoinDrop displayPrice(owedAmount) lookupCoin(coin) price [owedAmount<0] returnChange(-owedAmount) Iteration Condition …continued on next slide... …continued from previous slide... *

18 Sequence Diagrams Notations [test1] [NOT test1] Mutually Exclusive conditional messages

19 Sequence Diagrams Notations Iterative messages :Simulation : Random Run simulation() * num:=nextInt()

20 Sequence Diagrams Notations Iteration of a group of messages :Simulation : Random Run simulation() num:=nextInt() Work (hours) * [i=1..N]

21 Sequence Diagrams Notations If the message is repeated on a collection of object instances, use the “multi object” notation and (*) at the end of the link :SalesLineItem

22 Creation and destruction Creation is denoted by a message arrow pointing to the object Destruction is denoted by an X mark at the end of the destruction activation –In garbage collection environments, destruction can be used to denote the end of the useful life of an object. Passenger ChangeProcessor …continued from previous slide... Ticket createTicket(selection) free() Creation of Ticket Destruction of Ticket print()

23 Sequence Diagrams Notations “Self” messages: directed from the object to itself Create instance messages are indicated with > or call it create

24 Heuristics for Sequence Diagrams Creation of objects: Create control objects at beginning of event flow The control objects create the boundary objects Access of objects: Entity objects can be accessed by control and boundary objects Entity objects should not access boundary or control objects. Layout: 1st column: Should be the actor of 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

25 The impact of sequence diagram on the class diagram The sequence diagram supplies us with many new classes and operations Question: – Who owns these operations? Answer: – For each object that receives an event there is a public operation in its associated class

26 The impact of sequence diagram on the class diagram