SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.

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

Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
USE CASE – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
System Sequence Diagrams (SSD). Recap Concepts of Action, Pins and Activity Description of activity nodes and activity edges New notations – Activity.
CPSC 333: Foundations of Software EngineeringJ. Denzinger Small Test: Bank account manager System has to run on an automated teller machine. User must.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
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.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
Software Modeling Jerry Lebowitz.
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
Interaction Diagrams Software Engineering BIT8. Interaction Diagrams  A series of diagrams describing the dynamic behavior of an object-oriented system.
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Unified Modeling Language (UML)
Sequence Diagrams By Zvika Gutterman Adam Carmi. Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control Information Examples.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Sequence Diagrams2 Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Sequence Diagrams2 Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control.
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.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Slide 1 Use Case Sequence Diagram. Slide 2 Interaction Diagrams l Interaction diagrams model the behavior of use cases by describing the way groups of.
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Software Engineering UNIT 2. Functional Modelling.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
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.
Behavioral Modeling: Sequence and Communication Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan.
Behavioral Modeling Chapter 8.
M Taimoor Khan Sequence Diagrams Illustrates how objects interacts with each other. Emphasizes time ordering of messages.
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.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
1 START AT 31 MARCH END 8 APRIL PHASE5(CONCEPTUAL AND SEQUENCE MODEL)
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
UML Class Diagrams Sequence Diagrams CSE230 Dae-Kyoo Kim.
1 Kyung Hee University Interaction Diagrams Spring 2001.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
1 Case Study and Use Cases for Case Study Lecture # 28.
1 Systems Analysis and Design Behavioral Modeling Chapter 8 (Last one before the Midterm!)
CompSci 280 S Introduction to Software Development
Paul Ammann & Jeff Offutt
CMPE 280 Web UI Design and Development August 29 Class Meeting
Use Case Modeling - II Lecture # 27.
Sequence Diagrams Mimi Opkins CECS 493 Fall2016
Sequence Diagrams.
Dynamic Modeling of Banking System Case Study - I
Object-Orientated Analysis, Design and Programming
Sequence Diagrams.
Paul Ammann & Jeff Offutt
Interaction diagrams.
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Sequence Diagrams.
Presentation transcript:

SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25

Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations – Multiplicity – Aggregation – Composition – Generalization

Outline Interaction Diagrams – Sequence Diagram

Sequence Diagrams4 Interaction Diagrams A series of diagrams describing the dynamic behavior of an object-oriented system. – A set of messages exchanged among a set of objects within a context to accomplish a purpose. Often used to model the way a use case is realized through a sequence of messages between objects.

Sequence Diagrams5 Interaction Diagrams (Cont.) The purpose of Interaction diagrams is to: – Model interactions between objects – Assist in understanding how a system (a use case) actually works – Verify that a use case description can be supported by the existing classes – Identify responsibilities/operations and assign them to classes

Sequence Diagrams6 Interaction Diagrams (Cont.) UML – Collaboration Diagrams – Sequence Diagram

SEQUENCE DIAGRAM

Sequence Diagrams8 A First Look at Sequence Diagrams Illustrates how objects interacts with each other. Emphasizes time ordering of messages. Can model simple sequential flow, branching, iteration, recursion and concurrency.

Message1() Message2() Message3() Message4() [Condition:] Sequence Diagram

Sequence Diagrams10 A Sequence Diagram member: LibraryMember book:Book borrow(book) ok = mayBorrow() [ok] borrow(member) setTaken(member)

Sequence Diagrams11 A Sequence Diagram member: LibraryMember book:Book borrow(book) ok = mayBorrow() [ok] borrow(member) X-Axis (objects) Y-Axis (time) Object Life Line message condition setTaken(member) Activation Box

Sequence Diagrams12 Object Object naming: – syntax: [instanceName][:className] – Name classes consistently with your class diagram. The Life-Line represents the object’s life during the interaction myBirthdy :Date

Sequence Diagrams13 Messages An interaction between two objects is performed as a message sent from one object to another. If object obj 1 sends a message to another object obj 2 some link must exist between those two objects (dependency, same objects)

Sequence Diagrams14 Messages (Cont.)  A message is represented by an arrow between the life lines of two objects.  Self calls are also allowed  The time required by the receiver object to process the message is denoted by an activation-box.  A message is labeled at minimum with the message name.  Arguments and control information (conditions, iteration) may be included.

Sequence Diagrams15 Return Values Optionally indicated using a dashed arrow with a label indicating the return value. – Don’t model a return value when it is obvious what is being returned – Model a return value only when you need to refer to it elsewhere, e.g. as a parameter passed in another message. – Prefer modeling return values as part of a method invocation, e.g. ok = isValid()

Sequence Diagrams16 Object Creation An object may create another object via a > message. :A:B > Constructor :A > :B Preferred

Sequence Diagrams17 Object Destruction An object may destroy another object via a > message. – An object may destroy itself. – Avoid modeling object destruction unless memory management is critical. :A:B >

Sequence Diagrams18 Control information Condition – syntax: ‘[‘ expression ’]’ message-label – The message is sent only if the condition is true – example: Iteration – syntax: * [ ‘[‘ expression ‘]’ ] message-label – The message is sent many times to possibly multiple receiver objects. [ok] borrow(member)

Sequence Diagrams19 Control Information (Cont.) Iteration examples: :Driver *[until full] insert() :Bus The syntax of expressions is not a standard :CompoundShape:Shape *draw() draw()

Iteration Example:

Contd.. In ATM example, the “Withdraw Money” use case, has several alternate flows. Therefore there will be several Interaction Diagrams. A “happy day” Interaction Diagram shows what happens when all goes well There are additional Interaction Diagrams to show alternate flows, for e.g. – What happens when the user enters a wrong PIN – What happens when there isn’t enough money in the account to be withdrawn etc.

Sequence Diagram Contd.. Lets take the basic flow where, say for e.g. “Joe withdraws $20 from the ATM” Objects? – Card Reader – ATM Screen – Joe’s Account – Cash Dispenser A good way to identify the objects is to examine nouns in your flow of events. Some of the nouns will be actors, some will be objects, some will be attributes of the objects. The noun having some behaviour is an object. The one which is an information is just an attribute.

Joe withdraws $20 from the ATM (flow of events) – The process begins when Joe inserts his card into the card reader. The card reader reads the number on Joe’s card, then tells the ATM screen to initialize itself – The ATM prompts Joe for his PIN. – Joe enters PIN and the ATM opens his account – Joe’s PIN is validated and the ATM prompts him for a transaction – Joe selects Withdraw Money – The ATM prompts Joe for an amount. – Joe enters $ 20. – The ATM verifies that Joe’s account has sufficient funds and subtracts $ 20 from his account. – The ATM dispenses $ 20 and ejects Joe’s card Sequence Diagram Contd..

Summary Interaction Diagrams – Sequence diagrams