티스토리 뷰

ooad

UML Behavioral Diagrams

dictee 2019. 5. 6. 00:11

※ tutorialspoint의 OOAD 요약 (https://www.tutorialspoints.com/object_oriented_analysis_design/)

 

1. Use Case Model

Use case

시스템의 action sequence 표현. 시스템 외부와 시스템 간의 interaction. 시스템 일부 뿐만 아니라 전체에 대해서도 적용 가능.

Actor

use case를 수행하는 user role 표현. person (student, customer), devie (workstation), 다른 시스템 (bank, institution) 등. 

다음 그림은 Student라는 이름을 갖는 actor, Generate Performance Report use case 표현.

 

2. Use case diagrams

시스템의 element의 동작 방식과 어떻게 사용되는지를 outside view를 통해 표현.

구성 요소는,

  • Use cases
  • Actors
  • Relationships like dependency, generalization, and association

use case 사용은,

  • rectangle 내에 시스템의 모든 activity를 담고, 시스템 외부의 actor와의 interaction 모델링
  • 시스템 외부 관점에서 시스템의 요구 사항 모델링

Example: Automated Trading House System 가정. 시스템 feature는, 

  • individual customer, corporate customer 2가지 고객과 거래

  • 고객이 order하면, sales department가 처리 후, 고객은 bill을 받음
  • 시스템은 manager가 cusotmer account, 고객 문의 사항에 대한 답변 처리하도록 함

3. Interaction Diagrams

object간의 interaction과 relationship 표현. 2가지 종류의 diagram,

  • Sequence Diagrams
  • Collaboration Diagrams

Interaction diagrams are used for modeling - 

  • sequence diagram: 시간 순 control flow

  • collaboration diagram: organization의 control flow

4. Sequence Diagrams

시간 순 message 순서 설명

Notations: 2차원 chart 형식. interaction을 시작하는 object는 x축에 위치. 이 object들이 송수신하는 message들은 시간 순서에 따라 위에서 아래로 y축에 배치.

Example: Automated Trading House System

5. Collaboration Diagrams

message를 송수신하는 object간들의 structure 표현.

Notations: object는 vertex로 표현. message는 object간의 송수신 link이며, labeled arrow로 표현.

Example: Automated Trading House System

6. State–Chart Diagrams

하나의 state에서 다른 곳으로 이동하는 control flow를 갖는 state machine을 표현. object가 event 처리에 대한 state 순서 기술.

구성 요소,

  • States: Simple or Composite
  • Transitions between states
  • Events causing transitions
  • Actions due to the events

reactive object 모델링 용도.

Example: Automated Trading House System에서, object로서의 Order를 모델링하고, 그 순서를 따라간다면,

7. Activity Diagrams

state machine에서 non-atomic operation의 control flow 표현. 

구성 요소,

  • Activity states and action states
  • Transitions
  • Objects

모델링 용도는,

  • actor 관점의 workflow, 시스템과의 interaction
  • flowchart를 이용한 세부 operation 또는 computation

Example: Automated Trading House System의 일부

댓글