Presentation is loading. Please wait.

Presentation is loading. Please wait.

More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.

Similar presentations


Presentation on theme: "More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3."— Presentation transcript:

1 More on UML 1

2 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3. Behaviour diagram (dynamic): 3.1 Activity diagram 3.2 Interaction diagram 3.2.1 Sequence diagram – and message sequence chart UML diagrams Sli de 2

3  Dynamic: describe what is happening ◦ actions, steps  Capture the behaviour of a single use case  2 types ◦ Sequence Diagram – Message Sequence Chart ◦ Collaboration Diagram  2 levels: ◦ Analysis : system level (actions/activities) ◦ Design : object level (responsibilities + methods)  How groups of objects collaborate to get the job done Sli de 3

4  Use Case Driven Approach  Need to think about how a use case (scenario) can take place  It forces the analyst to think about objects involved in the application Sli de 4

5  At least one scenario be prepared for each significantly different use-case instance  Helps us to understand the behaviour of the objects making up the system Sli de 5

6  Assist in the design of the system by modelling the interactions between objects in the system Sli de 6

7  A sequence diagram shows an interaction arranged in a time sequence  A sequence diagram has two dimensions: ◦ The vertical dashed lines represent the Objects (objects lifeline) ◦ The horizontal lines represent the events that occur between objects Sli de 7

8  When drawing a sequence diagram, lifeline notation elements are placed across the top of the diagram.  Lifelines represent either roles or object instances that participate in the sequence being modeled. 8

9  The first message of a sequence diagram always starts at the top and is typically located on the left side of the diagram for readability. Subsequent messages are then added to the diagram slightly lower then the previous message. 9

10  Add objects to the page at the top ◦ Represents the existence of an object at a particular time  Add activation bars ◦ Period of time during which an object is performing an action  Add messages ◦ Communication between objects (action will ensue) ◦ Only when objects are “active” Sli de 10

11 Sli de 11 CustomerHotel Request quote Ask for details Provide information Send quote

12  The lifeline represents the objects existence during the interaction [vertical dashed line]  A Sequence diagram does not show the association among objects Sli de 12

13  Each message is represented by an arrow between the lifelines of two objects  The order of these messages is shown ‘top-to-bottom’  Each message is labelled with the message name Sli de 13

14  When a telephone is on-hook, it is in idle state, meaning that no previous behaviour is of great interest and that the phone is ready to initiate and receive calls  When someone picks up the handset, we say that the phone is now off-hook and in the dialing state; ◦ in this state, we do not expect the phone to ring ◦ we expect to be able to initiate a conversation with a party or parties on another telephone by dialing their number  When the phone is on-hook, it may ring. ◦ When we pick up the handset the phone is in the receiving state ◦ We expect to be able to converse with the party who initiated the call Sli de 14

15 Sli de 15

16  Make sure the messages are organised in chronological order  Include activation bars  Return messages should be illustrated using dashed horizontal lines and open ended arrows  The class to which each object belongs to should be included with the object in the diagram  Object:Class1  Aim for simplicity in your sequence diagrams! 16


Download ppt "More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3."

Similar presentations


Ads by Google