??????????????????????????????????? Lec08 :: Behavioral Modeling with UML Behavioral Diagrams Interaction Diagrams Nattapong Songneam xnattapong@hotmail.com http://www.siam2dev.com - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

??????????????????????????????????? Lec08 :: Behavioral Modeling with UML Behavioral Diagrams Interaction Diagrams Nattapong Songneam xnattapong@hotmail.com http://www.siam2dev.com

Description:

Title: Behavioral Diagrams - Interaction Diagrams Subject: Object-Oriented Analysis and Design Author: Jarungjit Parnjai Last modified by: siam2dev – PowerPoint PPT presentation

Number of Views:639
Avg rating:3.0/5.0
Slides: 40
Provided by: Jarungji3
Category:

less

Transcript and Presenter's Notes

Title: ??????????????????????????????????? Lec08 :: Behavioral Modeling with UML Behavioral Diagrams Interaction Diagrams Nattapong Songneam xnattapong@hotmail.com http://www.siam2dev.com


1
???????????????????????????????????Lec08
Behavioral Modeling with UMLBehavioral
DiagramsInteraction Diagrams Nattapong
Songneamxnattapong_at_hotmail.comhttp//www.siam2de
v.com
2
Lecture Outline
  • UML Behavioral Diagrams
  • Interaction Diagrams
  • Sequence Diagram
  • Collaboration Diagram

3
UML has 9 kinds of diagrams
  • Class Diagram
  • Object Diagram
  • Component Diagram
  • Deployment Diagram
  • Use Case Diagram
  • Sequence Diagram
  • Collaboration Diagram
  • StateTransition Diagram
  • Activity Diagram

Structural Diagrams
Behavioral Diagrams
4
UML(Unified Modeling Language)
  • 5 ????????????? UML
  • Use-case view ???????????????????????????????
    ?????????????????????????????????? ????
    ??????????
  • use-case diagram
  • Logical view ???????????????????????????????????
    ????? ??????????? static structure ??? dynamic
    behavior
  • class diagram, object diagram, state, sequence,
    collaboration, activity diagrams

5
UML(Unified Modeling Language)
  • Component view ??????????????????? implement
    ????????????????? ??? dependency
    ??????????????????????????
  • component diagram
  • Concurrency view ?????????? process ???
    processors ?????????????? communication ???
    synchronization
  • dynamic diagrams (state, sequence, collaboration
    activity)
  • implementation diagrams(component ??? deployment)
  • Deployment view ???????????????????????????
    ?????????? ?????????????
  • deployment diagram

6
Static Dynamic views
  • ??????? ?????????????????????? 2 ??? ??????
  • static ??? dynamic
  • ???????????? Use Case ??? Class Diagram ???????
    static
  • ????????????????????? ???? ??????????? ??????
    ??? ???????????????????????
  • ?????????????????????????? ?????????????????????
  • ???????????? Behavioral Diagrams ??????? dynamic

7
Behavioral Diagrams
  • Behavioral Diagrams ???????????????? dynamic
  • 4 diagrams ??????
  • Sequence Diagram
  • Collaboration Diagram
  • State-transition Diagram
  • Activity Diagram

Interaction Diagrams
8
Interaction Diagrams
9
Interaction diagrams
  • ??????????????????????????????????????
  • ???????????????????????? use case 1 use case
  • ??????????????????????????????????
  • 2 ??????
  • Time-based (Sequence Diagram)
  • Organization-based (Collaboration Diagram)

10
Sequence Collaboration Diagrams
  • ???? 2 diagrams ???? message ?????????????????????
    ??????????????????? ??????????????????????????????
    ???????
  • Sequence diagrams ???? message ???????????????????
    ???????
  • Collaboration diagrams ???????????????????????????
    ????????????????????????????????

11
Sequence Collaboration Diagrams
  • ???? 2 diagrams ??????????????????????????????????
    ??????????? ??????????????
  • ???? ??????????????????????????????????????????
    Use Case ?? Use Case ?????????????

12
A Sequence Diagram
13
A Collaboration Diagram
14
Interactions Core Elements
15
Interaction Core Elements (contd)
16
Interaction Core Relationships
17
Sequence diagrams
  • ?????????????????????????????????????????? (time
    sequence)
  • ??????????
  • actor ???? object ?????????????????????????????
  • ????????? (lifeline)
  • Message ????????????????? Object ???? actor

18
Content of sequence diagrams
  • Actor ???? ????? (Objects)
  • ?????????? messages ???????????????
  • ????????? (Lifeline)
  • ???????????????????????? ?????????????????
  • Messages
  • message ????????????????? objects
    ??????????????????????????????????
  • ?????????????? object ????????????????????????????
    ????
  • object ??? ???????????????? object ????? ???????
    operation ?????????????

19
Message Types
  • Simple
  • Sender / Receiver
  • ??????????????????????????????????????????????????
    ??
  • Synchronous
  • ???????? Operation ???????? ??? Sender/Caller
    ???? ???????Operation
  • Receiver ??????? passive object
  • Asynchronous
  • ???????? return ????????? Sender/Caller
  • Sender ???????????????????? message
  • Receiver ??????? active object

20
Message Notation
Simple
Synchronous
Asynchronous
(Message return)
21
Notation Sequence Diagram
22
Example Different Arrows
23
Example Sequence diagram
24
Example Sequence diagram
25
Interaction Collaboration Diagrams
26
What is a collaboration?
  • Collaboration
  • ?????????? (role) ????????????????????????????????
    ???????? ???????????? operation ???? use case
  • Interaction
  • ?????????????????????????????????? (communication
    pattern) ??????????????????? ?????????????????
    collaboration

27
Content of Collabaration diagrams
  • ????? (Objects)
  • ?????????? messages ???????????????
  • Messages
  • Synchronous call events, ??????? full arrow
  • Asynchronous signals, ??????? half arrow
  • create ??? destroy messages
  • ???????????????? Message ???????????????????-????
    ??????????? Loop ??? Message

28
Collaboration diagrams
  • ???????????? ???????????? messages ???????
  • 1, 2, 3, 4, ..
  • 1, 1.1, 1.2, 1.3, 2, 2.1, 2.1.1, 2.2, 3 (????
    operation calls ?????????????????? operation
    ?????)

29
Collaboration diagram basics
ProfessorCourseManager
1 Add professor (Professor)
Math 101 - Section 1 CourseOffering
30
Example Collaboration diagram
1 set course info 2 process
course form CourseForm
Registrar
3 add course
theManager CurriculumManager
aCourse Course
4 ltltcreategtgt
31
Example Collaboration diagram
1 Print(ps-file)
myComputer/PrintClient Computer
Customer
2 Print(ps-file)
printer free 2.1 Print(ps-file)
ThePrintServer Print Server
aPrinter Printer
aQueue Queue
printer busy 2.1 Print(ps-file)
32
Comparing sequence collaboration diagrams
  • collaboration diagrams ??????? static connections
    ???????? ?????????????????????????????????????????
    ???
  • Sequence diagrams ??????????????????
    ??????????????????????????????????????????????
  • ????????????????????? collaboration diagrams
  • ????????????????????? ?????????????????????
    ??????????? diagram ?????

33
Interaction Modeling Tips
  • ???????????????????? Include only those features
    of the instances that are relevant.
  • ???? flow ???????????? ??????????????
  • ??? sequence diagrams
  • ??????????????????????????????????????????????????
    ????? ????????????
  • ???????? real-time modeling
  • ??? collaboration diagrams
  • ????????????????????? ???????????

34
Example A Booking System
35
Use Case Description Change Flt Itinerary
  • Actors
  • traveler, client account db, airline reservation
    system
  • Basic course
  • Traveler ????? change flight itinerary option
  • System ?????? account ??? flight itinerary ???
    traveler ??? client account database
  • System ??? traveler ??? traveler ????????????
    itinerary segment ?????????????????????
  • ...

36
Use Case Description Change Flt Itinerary
  • ...
  • System ??? traveler ???????????????????
    departure ??? destination traveler
    ???????????????
  • ??? flights ??? traveler ??????????????
    ???????????? ???
  • System ?????????????? transaction
  • Alternative course
  • ??? flights ??? traveler ??????????????
    ???????????? ???

37
Sequence Diagram Change Flight Itinerary

38
Collaboration Diagram Change Flt Itinerary
5 select segment
7 update information
6 present detailed info
39
Summary
  • UML Behavioral Diagrams
  • Interaction Diagrams
  • Sequence Diagram
  • Collaboration Diagram
Write a Comment
User Comments (0)
About PowerShow.com