Use Case 다이어그램

Download Report

Transcript Use Case 다이어그램

StarUML
2006.11.23. UOS, SELab.
Jinhan Kim.
1. StarUML 특징
 StarUML™은 UML(Unified Modeling Language)을 지원하는 소프
트웨어 모델링 플랫폼.



UML 버전 1.4에 기반을 두고 있으며, UML 버전 2.0의 표기법을 적
극적으로 지원.
UML Profile 개념과 템플릿 기반의 문서 및 코드 생성을 지원하여
MDA(Model Driven Architecture) 접근방법을 적극적으로 지원.
UML 1.4 표준 메타모델과 2.0 표기법을 최대로 준수하면서 UML
Profile 개념을 제공하여 플랫폼에 독립적인 모델을 작성할 수 있
도록 지원.
University of Seoul, Software Engineering Laboratory
2. 모델, 뷰, 그리고 다이어그램
 StarUML™에서는 모델과 뷰 그리고 다이어그램의 개념을 서로
분리해서 사용



모델(Model)은 소프트웨어 모델에 관한 정보를 담고 있는 요소를
의미
뷰(View)는 모델이 담고 있는 정보를 시각적으로 표현한 것을 의
미
다이어그램(Diagram)은 뷰 요소들의 집합으로써 사용자의 일정한
생각을 표현한 것을 의미
University of Seoul, Software Engineering Laboratory
3. 새 프로젝트 만들기
 [File]->[New Project By Approach] 메뉴를 선택.
 4가지 접근법들 중에 하나을 선택.
체크시, 앞으
로는 접근법을
물어보지않는
다.
University of Seoul, Software Engineering Laboratory
4. 프레임워크 불러오기
 [File]->[Import]->[Framework] 메뉴를 선택.

프레임워크를 불러오더라도 프레임워크의 요소들은 프로젝트에
저장되지 않음
University of Seoul, Software Engineering Laboratory
5. UML 프로파일 포함하기
 정의되어 있는 UML 프로파일들을 현재 프로젝트 내부로 포함시켜 사
용.
 UML 프로파일이 프로젝트에 포함되면 프로파일에서 정의된 스테레
오타입(Stereotype), 확장속성(TagDefinition) 및 데이터타입(DataType)
등을 프로젝트에서 사용할 수 있음.
 코드생성기 작동시 프로파일 부터 포함하여야 함.
University of Seoul, Software Engineering Laboratory
6. 메인 윈도우
툴 박스
모델 탐색기,
다이어그램 탐색기
프로퍼티 편집기,
문서화 편집기,
첨부파일 편집기
University of Seoul, Software Engineering Laboratory
7. 프로퍼티 편집기
 프로퍼티 편집기는 현재 선택된 모델 요소의 세부적인 프로퍼
티를 편집하기 위해서 사용됨.
 모든 classifier 들의 속성은 프로퍼티 편집기에서 변경하며,
classifier 가 소유한 콜렉션 또한 프로퍼티 편집기에서 변경함.
일반적인 속성들
세부적인 속성들
classifier가 소유한 콜렉션이며, 콜렉션 또한
classifier들의 집합이다.
University of Seoul, Software Engineering Laboratory
8. 문서화 편집기
 문서화 편집기는 현재 선택된 요소에 부가적인 설명을 기록하
기 위해서 사용됨.
 간략 문서.
University of Seoul, Software Engineering Laboratory
9. 첨부파일 편집기
 첨부파일 편집기는 사용자가 특정 요소에 파일 혹은 웹 주소
(URL)를 첨부 가능.
 첨부 목록에서 선택된 첨부 파일 혹은 URL을 연결된 프로그램
으로 열어줌, 예를 들어 .hwp 파일의 경우에는 자동으로 한글 워
드프로세서 프로그램이 실행되고 http://www.staruml.com 과 같
이 주소인 경우에는 웹 브라우저에서 열림.
University of Seoul, Software Engineering Laboratory
 첨부되는 문서의 예
University of Seoul, Software Engineering Laboratory
10. StarUML에서 지원하는 다이어그램들









Use Case 다이어그램
Calss 다이어그램
Sequence 다이어그램
Collaboration 다이어그램
Statechart 다이어그램
Activity 다이어그램
Component 다이어그램
Deployment 다이어그램
Composite Structure 다이어그램

기본으로 UML 1.4를 지원하며, 로테이션에서 UML 2.0를 지원.
University of Seoul, Software Engineering Laboratory
 Use Case 다이어그램


쓰임새도, 사용사례도
행위자(Actor)와 쓰임새(Use Case)의 관계를 도식화
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
 Calss 다이어그램


클래스도는 시스템의 논리적인 관점에서 클래스들과 그 들의 관
계를 표시
클래스도의 요소


클래스와 그들의 구조 및 행위
클래스들 간의 관계
-


Association, aggregation, dependency, and inheritance 등
개수와 상호 참조 표시자 (Multiplicity and navigation indicators)
역할 이름 (Role names)
-
Person(employee) ---works for--- Company(employer)
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
 Sequence 다이어그램


순차도
시간 순서대로 객체 상호작용을 표시
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
 Collaboration 다이어그램



Communication Diagram (UML 2.0)
협력도, 교류도
객체 관점에서 객체들의 상호작용과 그들의 관계를 표시
University of Seoul, Software Engineering Laboratory
 Statechart 다이어그램




State Machine Diagram (UML 2.0)
상태도, 상태전이도, 상태기계도
클래스 일생을 나타내며, 한 상태에서 다른 상태로의 전이를 일으
키는 사건
상태 전이 결과인 행동(Action)을 표시
University of Seoul, Software Engineering Laboratory
 Component 다이어그램




콤포넌트도는 소프트웨어의 물리적인 구조와 콤포넌트 사이의
의존 관계를 표시
소스코드 콤포넌트(.h, .cpp, .dat)
런타임 콤포넌트(.dll) or 실행 파일 콤포넌트(.exe)
UML 2.0 에서는, 실제의 콤포넌트를 말함
component
package
University of Seoul, Software Engineering Laboratory
interface
dependency
compilation dependency
University of Seoul, Software Engineering Laboratory
 ployment 다이어그램


배치도는 런타임 프로세싱 요소들과 그 곳에서 운영할 소프트웨
어 구성 요소들을 표시
배치도는 전체 시스템 구성 요소들의 배치 상황을 시각화한다.
University of Seoul, Software Engineering Laboratory
11. 모델 탐색기의 구조
 Use Case View

Use Case, Sequence, and Collaboration Diagrams
 Logical View

Class and StateChart Diagrams
 Component View

Component Diagram
 Deployment View

Deployment Diagram
University of Seoul, Software Engineering Laboratory
12. Rose 와의 호환성
 Rose File -> Star File 로 변환 가능.
 Star File -> Rose File 로 변환 불가능.

대책 : XMI
University of Seoul, Software Engineering Laboratory
13. 모델 검사하기
 모델 검사하기 대화상자는 사용자가 모델 요소들이 잘 정의되
어 있는 가를 검사하기 위해서 사용.

Verification Rule


Verifying Element


현재 검사중인 요소의 이름이 나타냄.
Progress


모델 검사를 시작하게 되면 현재 적용하고 있는 검사 규칙이 나타나
는 영역.
검사가 얼마나 진행되었는가를 시각적으로 보여줌.
Failed

검사에서 탈락한 요소가 현재 몇개인가를 나타냄.
University of Seoul, Software Engineering Laboratory
University of Seoul, Software Engineering Laboratory
 기본적인 모델 검사 규칙들 (38 가지)
University of Seoul, Software Engineering Laboratory
 [‘cont]
University of Seoul, Software Engineering Laboratory
14. 코드와 문서 생성하기
 왜 생성하는가?

StarUML Generator는 StarUML의 모델요소들(UML Model Elements)
과 템플릿 문서(Tempate document)를 이용하여 각기 다른 형태의
산출물(MS Word, MS Excel, MS PowerPoint...)로 생성해주는 에드
인이며, 사용자 스스로가 얼마든지 새로운 템플릿을 정의하고 기
존 템플릿을 변형하여 사용할 수 있게 구성되어 있으므로, 하나의
모델로부터 여러 가지 템플릿을 이용하여 다양한 형태의 산출물
을 쉽고 빠르게 생성할 수 있음.
문서 생성하기
University of Seoul, Software Engineering Laboratory
JAVA 코드 생성 하기
Case Study
2006.11.23. UOS, SELab.
Jinhan Kim.
1. 요구사항
 웹 기반의 ATM 개발


BeRich 은행은 은행 고객들이 기본적인 금융 트랜잭션을 수행하
는 것을 가능하게하는 웹기반의 ATM 설치를 목적
은행 종업원의 비즈니스



고객을 추가하거나 삭제
계좌를 생성하거나 삭제
고객의 비즈니스





계좌 조회
트랜젝션 조회
인출
예금
계좌이체
University of Seoul, Software Engineering Laboratory
2. Use Case Diagram
University of Seoul, Software Engineering Laboratory
 logIn

customer
University of Seoul, Software Engineering Laboratory
 addCustomer
University of Seoul, Software Engineering Laboratory
 deleteCustomer
University of Seoul, Software Engineering Laboratory
 addAccount
University of Seoul, Software Engineering Laboratory
 showAccount
University of Seoul, Software Engineering Laboratory
 transfer
University of Seoul, Software Engineering Laboratory
3. Class Diagram
 전체
University of Seoul, Software Engineering Laboratory
 ejb
University of Seoul, Software Engineering Laboratory
4. State Machine Diagram
 TransactionControllerBean
University of Seoul, Software Engineering Laboratory
5. Component Diagram
University of Seoul, Software Engineering Laboratory
6. Deployment Diagram
University of Seoul, Software Engineering Laboratory