12강. uml (1) - kocwelearning.kocw.net/contents4/document/lec/2013/chungbuk/... · 2014-02-05 ·...

31
12강. UML (1)

Upload: others

Post on 12-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

12강. UML (1)

Page 2: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

학습 목표

• UML의 기본적 내용 파악

• 유즈케이스 다이어그램의 특성과 작성법 습득

Page 3: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• UML (Unified Modeling Language)

- 1997 OMG에서 객체지향 모델링 표준으로 채택.

- modeling business system as well as software system

* helps you specify, visualize, and document models of software systems,

including their structure and design, in a way that meets all of these

requirements.

(You can use UML for business modeling and modeling of other non-

software systems too.)

- 현재 Version 2.0

1)초보자를 위한 UML 객체지향설계, Joseph Schmuller 저, 곽용재, 오종범 역, 인포북,2004. 2)UML2.0 in a nut shell, Dan Pilone, O’reilly, 2005 3)OMG UML Specification Version 2.0, September 2005.

UML 개요(1)

Page 4: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

- Types

* Structure Diagrams : Class Diagram, Object Diagram,

Component Diagram, Composite Structure Diagram,

Package Diagram, and Deployment Diagram.

* Behavior Diagrams: the Use Case Diagram, Activity Diagram,

and State Machine Diagram.

* Interaction Diagrams: (all derived from the more general

Behavior Diagram) the Sequence Diagram, Communication

Diagram, Timing Diagram, and Interaction Overview Diagram.

UML 개요(2)

Page 5: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

UML2.0: 13 Diagrams

비즈니스 시스템 관점

- Function view -> Use Case Diagram

- Data view-> class diagram/object Diagram

- Process view-> activity diagram

- organization view -> class diagram

UML 개요(3)

Page 6: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

- Use Case diagrams define function, requirements and constraints

in the form of scripts or scenarios - Class diagrams define the basic building blocks of a model:

classes and general materials that are used to construct

a full model. - Object diagrams show how instances of structural elements are

related and used at run-time.

- Activity diagrams have a wide number of uses, from defining basic

control flow, to capturing the decision points and actions within

any generalized process

UML 개요(4)

Page 7: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 유즈케이스 다이어그램구성 요소

- system

- actor

- use case

Buy drink

restock

collect

소비자

보급원

수금원

자판기

system

actor

Use case

Use Case Diagram (1)

Page 8: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 유즈 케이스 다이어그램의 특성

- interactions between the roles of a system’s users

and subsets of system functionality

- captures a model of how several use cases depend on one

another and how one or more actors interact with those use

cases.

Use Case Diagram (2)

Page 9: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

Use Case Diagram(3)

• Use Case

- represents a complete functionality as perceived by an actor

- a set of action a system performs that yield an observable result of value to a particular actor.

- use case are implementation-independent descriptions of system functionality of the system

- a use case is realized in a collaboration;

- each use case has

* goal statement, priority, assumptions

* pre-conditions/post-conditions

* a list of activities describing how the actors fulfill the

identified goal.

Page 10: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• Actor

- someone or something that interacts with the system;

- it’s who or what uses the system.

- actor sends or receives messages to and from the system

- actor represents a role

Use Case Diagram(3)

Page 11: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• Use case diagram 작성 단계

① defining the system & list the primary

capabilities of the system

② finding the actors and use cases

③ defining the relationship between use case

and actor/ between use cases

④ describing the use case

⑤ validation of model

Use Case Diagram(5)

Page 12: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• Finding actor

① who will use the main functionality of the system ?

② who will need support from the system to do their daily tasks?

③ who will need to maintain, administrate, and keep the system

working?

④ which hardware devices does the system need to handle?

⑤ with which other systems does the system need to interact?

⑥ who or what has an interest in the results (the value) that the

system produces?

Use Case Diagram(6)

Page 13: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• Finding Use Cases

1) 액터 관련 질문

① which functions does the actor require from the system? What does the

actor need to know?

② Does the actor need to read, create, destroy, modify, or store some kind

of information in the system?

③ Does the actor have to be notified about events in the system, or does

the actor need to notify the system about something?

④ Could the actor’s daily work be simplified or made more efficient through

new functions in the system (typically functions currently not automated

in the system) ?

2) 액터와 관련되지 않은 부가적인 질문

① what input/output does the system need? Where does this input/output

come from or go to?

② What are the major problems with the current implementation of this

system? (perhaps a manual system instead of an automated system)

Use Case Diagram(7)

Page 14: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• Define the relationship

- relationship between an actor and a use case:

communicate association

- relationship between use cases

* <<include>>: factoring out common behavior that may be included

by other use cases. I.e. “uses” its functionality.

* <<extend>>: specify behavior that is optional or exceptional in the

description and not essential to the definition of

the base use case. I.e. 1) optional behavior,

2) behavior that is run only under certain conditions,

3) several different flows that may be run based on

actor selection.

Use Case Diagram(8)

Page 15: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

Name: Buy Can Use Case Objective: Use case pre-condition: Use case post-condition: Flow of actions: main flow, alternative flow, exception flow

- Use case 설명서: 시스템이 actor와 어떻게 상호작용하고, 각각의 Use case에서 무엇을 하는지 설명

• Pre-condition: conditions that must be true before the use case

begins. Use case가 실행되기 위해 필요한 시스템 내부 상태 (ex: 현금 자동

지급기 “현금 인출” -> “현금 자동 인출기가 ‘인출 가능 상태’이어야 한다”)

• Post-Condition: conditions that are guaranteed to be true by the

system after the use case is finished.

use case가 완료된 후에 액터에게 제공되는 결과와 시스템의 상태.

(ex: 현금 자동 지급기 “현금 인출” -> “현금이 지급됨. 잔액 갱신”)

Use Case Description

Page 16: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• Use case diagram 예: e-Business를 위한 시스템 통합

Use Case Diagram 예

Page 17: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• UML (Unified Modeling Language)

- 1997 OMG에서 객체지향 모델링 표준으로 채택.

- modeling business system as well as software system

- 13 diagrams

- type

* structure diagram:

* behavior diagram:

* interaction diagram

• 유즈케이스 구성 요소

- 시스템

- 액터

- 유즈케이스

학습 요약

Page 18: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

12강. UML(2) 학습 목표

• 클래스 다이어그램의 특성과 작성법 습득

• 활동 다이어그램의 특성과 작성법 습득

Page 19: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 클래스 다이어그램

- A class diagram describes the static view of a system in

terms of classes and relationships among classes.

- to visually represent the elements, relationships, and

constraints of a problem domain.

1) Modeling XML applications with UML (David Carlson),2001 2) Business Modeling with UML (Eriksson & Penker), 2001

Class Diagram(1)

Page 20: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 클래스 다이어그램 구성 요소

- class:

* define a set of attributes that represents its state and a set of

operations that represent its behavior.

- Relationships

* inheritance: generalization-specialization

- relationship between a more general and a more

specific element.

* association: connection between classes

- multiplicity (다중성)

- navigability (도달가능성)

- role

* aggregation: special association

- whole-part relationship

* composition: strong aggregation,

life time dependency

Class Diagram(2)

Page 21: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 조직 관점 클래스 다이어그램 예

Class Diagram(3)

Page 22: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 클래스 다이어그램 예- 기업 자원의 계층적 구조

Class Diagram(4)

Page 23: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 활동 다이어그램의 특성

- 객체지향 모델링 도구인 UML (Unified Modeling language)의 일부.

- capture actions and their results.

- focus on work performed in the implementation of an

operation, and the activities .

- flow chart와 흡사.

( 처리(activity), 의사결정 결정위치(decision point),

분기 처리(branch) 등을 표현)

Activity Diagram(1)

Page 24: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 구성 요소

activity

: start Point

: end point

: activity (process)

: transition

: branch

: - concurrently or by alternating - 두 activity가 하나로 합쳐지기 전에 둘 다 수행되어야 함.

parallel action

Activity Diagram(2)

Page 25: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 구성 요소

- Swimlane (구획면)

* 어떤 작업이 수행되는지를 표현하지만, 수행 주체에

대해서는 나타나지 않음. (role, organization, object..)

* 이를 위해 swimlane (점선)으로 구분해 표기.

- Object

* activity에 대한 input이나 output.

* <<physical object>>와 << information object>>

로 구분.

<<Information>> Product

Activity Diagram(3)

Page 26: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 활동 다이어그램 예 1

wakeUp

eatBreakfast goBackToSleep

[hungry] [not hungry]

(branch)

workout

relax shower

(parallel action)

activity1

activity2

(start/end point)

Activity Diagram 예(1)

Page 27: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 활동 다이어그램 예 2: 주문 이행 프로세스(1)

prepare

perform

supplier Customer

Evaluate

order

quote

invoice

inquire

(Event & Swimlane)

Activity Diagram 예(2)

Page 28: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 활동 다이어그램 예 3: 제품 개발 프로세스

Activity Diagram 예(3)

Page 29: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 활동 다이어그램 예 4: 주문 이행 프로세스 (2)

Activity Diagram 예(4)

Page 30: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 활동 다이어그램 예 5: 구매 프로세스

Activity Diagram 예(6)

Page 31: 12강. UML (1) - KOCWelearning.kocw.net/contents4/document/lec/2013/Chungbuk/... · 2014-02-05 · - Class diagrams define the basic building blocks of a model: classes and general

• 클래스 다이어그램 구성 요소

- class:

- relationship

* inheritance: generalization-specialization

* association: connection between classes

* aggregation: special association

* composition: strong aggregation,

• 활동 다이어그램 구성 요소

- 시작점/종료점 -활동

- 전이 -분기

- 병렬 활동 -구획면

- 객체

학습 요약