Interaction diagrams ppt

interaction diagrams in uml ppt and interaction diagram in ooad ppt
Dr.DouglasPatton Profile Pic
Dr.DouglasPatton,United States,Teacher
Published Date:26-07-2017
Your Website URL(Optional)
Comment
The University of Iowa CS:2820 (22C:22) Object-Oriented Software Development Spring 2015 Interaction Diagrams (Chapter 15) by Mauricio Monsalve Design Road Sample UP Artifact Relationships Domain Model Sale Sales 1 1.. Business . . . LineItem Modeling date . . . . . . quantity Vision Use-Case Model Process Sale Process use Sale 1. Customer case arrives ... Cashier names 2. ... 3. Cashier enters item identifier. Glossary Require- Use Case Diagram Use Case Text ments system ideas for the domain requirements events the post- objects, that must be conditions attributes, satisfied by : System and the software associations : Cashier Operation: make Supplementary that undergo enterItem(…) system NewSale() Specification changes operations Post-conditions: enterItem - . . . (id, quantity) Operation Contracts System Sequence Diagrams starting events to design for, and more detailed requirements that Design Model : Register : ProductCatalog : Sale must be satisfied by the software enterItem (itemID, quantity) Design spec = getProductSpec( itemID ) addLineItem( spec, quantity )Interaction Diagrams l  UML interaction diagrams represent interaction (communication, collaboration) between objects/classes l  For dynamic object modeling l  UML interaction diagrams consist of -  Sequence diagrams -  Communication diagrams Sequence Diagram : A myB : B doOne doTwo doThree We have used a simplified version of these for System Sequence Diagrams Communication Diagram doOne : A 1: doTwo 2: doThree myB : B Steps are enumerated and placed in lines with arrows The diagrams compared Sequence diagram Communication diagram l  clearly shows sequence l  space economical; or time ordering of flexibility to add new messages objects in two dimensions l  large set of detailed l  more difficult to see notation options sequence of messages l  forced to extend to the l  fewer notation options right when adding new objects; consumes horizontal space Exercise : Register : Sale makePayment(cashTendered) makePayment(cashTendered) create(cashTendered) : PaymentExercise : Register : Sale makePayment(cashTendered) makePayment(cashTendered) create(cashTendered) : Payment direction of message makePayment(cashTendered) 1: makePayment(cashTendered) :Register :Sale 1.1: create(cashTendered) :PaymentDrawing Sequence Diagrams lifeline box representing the class Font, or more precisely, that Font is lifeline box representing a lifeline box representing an an instance of class Class – an named instance unnamed instance of class Sale instance of a metaclass «metaclass» :Sale s1 : Sale Font List is an interface lifeline box representing an lifeline box representing instance of an ArrayList class, one instance of class Sale, in UML 1.x we could not use an parameterized (templatized) to selected from the sales interface here, but in UML 2, this (or hold Sale objects ArrayList Sale collection an abstract class) is legal sales: x : List sales i : Sale ArrayListSale related exampleDrawing Sequence Diagrams 1 : Register : Store the ‘1’ implies this is a Singleton, and accessed via the Singleton pattern doX doA l  In the case of singleton objects/classes, we put a “1” on their boxes l  Singleton classes are the ones that only have one instance -  Cf. Scala: singleton defined with “object”, not “class” Drawing Sequence Diagrams : Register : Sale doX doA doB a found message whose sender will not be specified doC doD execution specification bar indicates focus of control typical sychronous message shown with a filled-arrow lineDrawing Sequence Diagrams : Register : Sale doX d1 = getDate getDate aDate Two ways to specify a return value. The first one is brief. The second one allows one to describe the information contained in the returned value. Drawing Sequence Diagrams note that newly created : Register : Sale objects are placed at their creation "height" makePayment(cashTendered) create(cashTendered) : Payment authorizeDrawing Sequence Diagrams : Sale create(cashTendered) : Payment the «destroy» stereotyped ... message, with the large X and short lifeline indicates explicit object «destroy» X destruction Vertical “presence” or coverage demonstrates the life-cycle of an object Drawing Sequence Diagrams : A : B makeNewSale more items loop a UML loop enterItem(itemID, quantity) frame, with a boolean guard expression description, total endSale Types of frames: loop—for repeated statements, opt—for if-statements without else, alt—for if-statements with else or else-if, par—for parallel execution, region—for critical region (concurrency). Drawing Sequence Diagrams : A : B : C doX alt x 10 calculate else calculateDrawing Sequence Diagrams lineItemsi : : Sale This lifeline box represents one SalesLineItem instance from a collection of many t = getTotal SalesLineItem objects. lineItemsi is the expression to select one element from the loop i lineItems.size collection of many st = getSubtotal SalesLineItems; the ‘i” value refers to the same “i” in the guard i++ in the LOOP frame an action box may contain arbitrary language statements (in this case, incrementing ‘i’) it is placed over the lifeline to which it applies Vertical “presence” or coverage demonstrates the life-cycle of an object Drawing Sequence Diagrams : Foo : Bar xx opt color = red loop(n) calculate Nesting of frames Drawing Sequence Diagrams sd AuthenticateUser : B : C : A : B : C authenticate(id) doX doA doM1 doB doM2 ref authenticate(id) AuthenticateUser ref sd DoFoo DoFoo : B : C doX interaction occurrence doY note it covers a set of lifelines doZ note that the sd frame it relates to has the same lifelines: B and CPolymorphism Payment abstract Payment is an abstract authorize() abstract superclass, with concrete ... subclasses that implement the polymorphic authorize operation CreditPayment DebitPayment authorize() authorize() ... ... object in role of abstract polymorphic message superclass :Register :Payment abstract doX stop at this point œ don‘t show any authorize further details for this message :DebitPayment :Foo :CreditPayment :Bar authorize authorize doA doX doB separate diagrams for each polymorphic concrete case

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.