Presentation is loading. Please wait.

Presentation is loading. Please wait.

BTS430 Systems Analysis and Design using UML Interaction Diagrams.

Similar presentations


Presentation on theme: "BTS430 Systems Analysis and Design using UML Interaction Diagrams."— Presentation transcript:

1 BTS430 Systems Analysis and Design using UML Interaction Diagrams

2 Definition An interaction diagram illustrates how objects interact using messages for a given scenario. UML has two main types—sequence and communication.

3 Definition Interaction diagrams “force us to think through the concrete details of what messages to send and to whom and in what order”. text, p.225 They define how we meet our “operation contracts”.

4 Sequence Diagrams UI Layer Domain Layer

5 Sequence Diagrams :ProcessSaleFrame UI Layer Domain Layer makePayment(cashTendered)

6 Participants Lifeline Boxes (roughly equal to class instances) Common cases of notation: :Sales1:Sale unnamed instancenamed instance

7 Messages Occur between objects Starting messages are initiated by a random source or a specific source :Register Random Source Specific Source

8 Message Expression Syntax see page 227 Examples: startSale() or startSale desc=getDescription(itemID) OR getDescription(itemID), with “product description” shown as a return

9 Returns :Register:Sale makePayment(cashTendered) change due makePayment(cashTendered) OR changeDue=makePayment(cashTendered)

10 Object Creation :Register:Sale makePayment(cashTendered) :Payment create(cashTendered) makePayment(cashTendered) invokes the “new” operator and calls the constructor: public class Sale { private Payment payment; public void makePayment( Money cashTendered ) { payment = new Payment( cashTendered ); ….and so on

11 Object Destruction :Register:Sale makePayment(cashTendered) :Payment create(cashTendered) makePayment(cashTendered) Payment object destroyed … > X

12 Messages to Self :Register newSale() clear() …


Download ppt "BTS430 Systems Analysis and Design using UML Interaction Diagrams."

Similar presentations


Ads by Google