1 / 37

APPLYING UML AND PATTERNS

APPLYING UML AND PATTERNS. PART 3. ELABORATION ITERATION 1 Chapter 15. UML Interaction Diagram. Objectives. 기본적인 UML Interaction Diagram notation 을 소개 다음 장 : 기본적인 UML Class Diagram 을 소개 그 다음 장 : 실제 설계 사례를 소개. Introduction. Dynamic object Modeling 을 위하여 Interaction Diagram 을 사용

oki
Download Presentation

APPLYING UML AND PATTERNS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. APPLYING UML AND PATTERNS PART 3. ELABORATION ITERATION 1 Chapter 15. UML Interaction Diagram

  2. Objectives • 기본적인 UML Interaction Diagram notation을 소개 • 다음 장: 기본적인 UML Class Diagram을 소개 • 그 다음 장: 실제 설계 사례를 소개 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  3. Introduction • Dynamic object Modeling을 위하여 Interaction Diagram을 사용 • 표기법 만 소개 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  4. 15.1 Sequence Diagram과 Communication Diagram • Interaction Diagram • Sequence Diagram • Communication Diagram 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  5. Sequence Diagram과 Communication Diagram의 장단점 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  6. Sequence Diagram 예제: makePayment 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  7. 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  8. 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  9. 15.3 UML Interaction Diagram의 표기법 http://www.holub.com/goodies/uml/ lifeline box representing the class Font , or more precisely , that Font is lifeline box representing a lifeline box representing an an instance of class Class – an named instance unnamed instance of class Sale instance of a metaclass 클래스임을 나타냄 «metaclass» : Sale s 1 : Sale Font List is an interface lifeline box representing an lifeline box representing instance of an ArrayList class , one instance of class Sale , in UML 1 . x we could not use an parameterized ( templatized ) to selected from the sales interface here , but in UML 2 , this ( or hold Sale objects ArrayList < Sale > collection an abstract class ) is legal sales : x : List sales [ i ] : Sale ArrayList < Sale > 보통 스테레오타입을 쓴다. <<interface>> related example 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  10. 기본 메시지 표현 문법 • 타입 정보가 중요하지 않으면 생략 가능 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  11. Singleton 객체의 표현 • Singleton 이란?먼저 Singleton 패턴의 용도는 하나의 프로그램 내에서 하나의 인스턴스만을 생성해야만 하는 상황. • 예를 들어 환경설정을 관리하는 클래스나 Connection Pool, Thread Pool과 같이 풀(Pool) 형태로 관리되는 클래스의 경우 프로그램 내에서 단 하나의 인스턴스로 관리되는 것이 일반적이며, 이 때 Singleton 패턴을 적용 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  12. 15.4 Sequence Diagram의 기본적인 표기법 • 최초 메시지(found message) • 실행 명세 막대(execution specification bar) 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  13. 응답 또는 반환 나타내기 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  14. self 또는 this 로의 메시지 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  15. 인스탄스의 생성 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  16. 객체의 생성과 소멸 • C++처럼 garbage collection기능이 없는 경우나 특별히 소멸을 명시할 필요가 있는 경우 사용 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  17. 다이어그램 프레임 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  18. 조건 프레임 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  19. 상호배타적 조건 프레임 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  20. 컬렉션에 대한 반복 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  21. 프레임의 중첩 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  22. Interaction Diagram들을 연결시키기 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  23. 클래스 속성, 메소드 • 정적 또는 클래스 메소드 호출 • Object Attribute .vs. Class Attribute ? • Object Method .vs. Class Method ? • e 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  24. Payment { abstract } Payment is an abstract authorize () { abstract } superclass , with concrete ... subclasses that implement the polymorphic authorize operation CreditPayment DebitPayment authorize () authorize () ... ... object in role of abstract polymorphic message superclass : Register : Payment { abstract } doX stop at this point – don’t show any authorize further details for this message : DebitPayment : Foo : CreditPayment : Bar authorize authorize doA doX doB separate diagrams for each polymorphic concrete case 다형적 메시지와 사례들 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  25. a stick arrow in UML implies an asynchronous call active object a filled arrow is the more common synchronous call System : : ClockStarter Class In Java , for example , an asynchronous call may occur as follows : startClock // Clock implements the Runnable interface Thread t = new Thread ( new Clock () ) ; create : Clock t . start () ; the asynchronous start call always invokes the run method run on the Runnable ( Clock ) object runFinalization to simplify the UML diagram , the Thread object and the start message may be avoided ( they are standard “overhead” ) ; instead , the essential detail of the Clock creation and the run message imply the asynchronous call • 동기적 비동기적 호출 • 비동기적 메시지: 응답을 기다리지 않는다. • 열린 화살표 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  26. 링크 가시성 연관의 인스턴스를 표현 15.5 Communication Diagram의 표기법 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  27. 메시지 • 첫 번째 메시지는 번호가 없다. 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  28. self 또는 this 로의 메시지 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  29. Three ways to show creation in a communication diagram create message , with optional initializing parameters . This will normally be interpreted as a constructor call . 1 : create ( cashier ) : Register : Sale 1 : create ( cashier ) : Register : Sale { new } «create» 1 : make ( cashier ) : Register : Sale if an unobvious creation message name is used , the message may be stereotyped for clarity • 인스턴스의 생성 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  30. 메시지 번호 붙이기 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  31. 조건 메시지 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  32. 상호 배타적인 조건 경로 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  33. 반복 또는 루프 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  34. 컬렉션에 대한 반복 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  35. message to class , or a static method call doX 1 : locs = getAvailableLocales «metaclass» : Foo Calendar • 정적 메소드 호출 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  36. stop at this point – don’t show any polymorphic message further details for this message object in role of abstract doX authorize : Register : Payment { abstract } superclass authorize authorize doA doX doB : DebitPayment : Foo : CreditPayment : Bar separate diagrams for each polymorphic concrete case • 다형성 메시지와 사례들 금오공과대학 컴퓨터공학부 컴퓨터공학전공

  37. 동기적/비동기적 호출 금오공과대학 컴퓨터공학부 컴퓨터공학전공

More Related