제목

Size: px
Start display at page:

Download "제목"

Transcription

1 Object-Oriented Design Agile for Software Development Story 7. 작 성 자 : 고형호 메 일 : hyungho.ko@gmail.com 홈페이지 : 최초작성일 : 최종작성일 :

2 Goal A Set of Contained Responsibilities 2

3 Content 1. Customer Requirement 2. Customer Requirement Analysis 3. Structure Improvement 4. SRP(Single Responsibility Principle) Violation 5. Design Pattern 6. Class Diagram in Practice 7. Design Pattern in Practice 8. Summary 3

4 4 1. Customer Requirement

5 Customer Requirement 요구사항 : Rectangle, Ellipse 도형을그린다. ( 외부와의계약, 변화하지않는것 ) 철저히은닉되어야한다. 5

6 Customer Requirement 요구사항 : 그리기 : Rectangle, Ellipse 도형 OOD 원칙구현 SRP Client DIP <<interface>> IShape 그리기 ( 외부와의계약, 변화하지않는것 ) RectangleShape OCP(LSP) EllipseShape Rectangle, Ellipse 6

7 Customer Requirement 요구사항 : Rectangle, Ellipse 이합성 ( 合成 ) 된도형을그린다. Rectangle ( 외부와의계약, 변화하지않는것 ) Ellipse Rectangle, Ellipse 합성 ( 合成 ) 된도형 합성 ( 合成 ) : 둘이상의것을합쳐서하나를이룸. 철저히은닉되어야한다. 7

8 Customer Requirement 요구사항 : 그리기 : Rectangle, Ellipse, 합성 ( 合成 ) 된도형 OOD 원칙구현 SRP Client DIP <<interface>> IShape 그리기 ( 외부와의계약, 변화하지않는것 ) RectangleShape Rectangle EllipseShape Ellipse OCP(LSP) CompositeShape 합성된도형 8

9 9 2. Customer Requirement Analysis

10 Customer Requirement Analysis 요구사항 : Rectangle, Ellipse 이합성 ( 合成 ) 된도형을그린다. 합성 ( 合成 ) 된도형은 Rectangle, Ellipse 도형을그리기위한추가책임이다. Sub- 요구사항정리 요구사항 : Rectangle, Ellipse 이합성 ( 合成 ) 된도형을그린다. Sub- 10

11 Customer Requirement Analysis /Sub- 관계 Sub- 는 의합성 ( 合成 ) 으로이루어진다. 합성 ( 合成 ) : 둘이상의것을합쳐서하나를이룸. 합성된도형 Sub- Rectangle Ellipse 1 개 ( 전체 ) N 개 ( 부분 ) /Sub- 관계정리 Sub- = : : N ( 부분 ) 1 ( 전체 ) 11

12 Customer Requirement Analysis 요구사항 : Rectangle, Ellipse 이합성 ( 合成 ) 된도형을그린다. Sub- Sub- 는 의추가책임이므로, 의구현은 에게위임한다. Ex. 그리기 합성된도형 Sub- Rectangle Ellipse 12 요구사항정리 요구사항 : Rectangle, Ellipse 이합성 ( 合成 ) 된도형을그린다. Sub-

13 Customer Requirement Analysis : 그리기 요구사항 : Rectangle, Ellipse Sub- : 합성 ( 合成 ) 된도형 ( : Sub- = N : 1) Decorator Pattern 구현 그리기 ( 외부와의계약, 변화하지않는것 ) <<interface>> IShape RectangleShape Rectangle EllipseShape Ellipse DecoratorShape #DecoratorShape(IShape*) CompositeShape 책임구분 (/Sub- 구분 ) 합성된도형 Sub- 1 개 ( 전체 ) 13 N 개 ( 부분 )

14 Customer Requirement Analysis : Sub- = N : ( 부분 ) 1 ( 전체 ) 전체는부분을관리하기위한추가작업이필요하다. 관리구현 그리기 ( 외부와의계약, 변화하지않는것 ) <<interface>> IShape 14 RectangleShape Rectangle N 개 ( 부분 ) EllipseShape Ellipse DecoratorShape #DecoratorShape(IShape*) CompositeShape +Add(IShape*) +Remove(IShape*) 책임구분 (/Sub- 구분 ) 합성된도형 Sub- 1 개 ( 전체 )

15 15 3. Structure Improvement

16 Structure Improvement 구조단순화 그리기 ( 외부와의계약, 변화하지않는것 ) <<interface>> IShape RectangleShape EllipseShape DecoratorShape #DecoratorShape(IShape*) 책임구분 (/Sub- 구분 ) 16 Rectangle N 개 ( 부분 ) DecoratorShape 역할 Ellipse CompositeShape +Add(IShape*) +Remove(IShape*) Sub- 추가로인한중복코드및클래스구조복잡성을제거한다. 즉, 전제조건은 : Sub- = 1 : N 이다. 그러나, : Sub- = N : 1 관계에서는그역할이약하다. 합성된도형 Sub- 1 개 ( 전체 )

17 Structure Improvement : Sub- = N : 1 관계에서는그 Decorator 클래스역할이약하다. (/Sub- 구분 ) /Sub- 구분제거 그리기 ( 외부와의계약, 변화하지않는것 ) <<interface>> IShape RectangleShape EllipseShape CompositeShape Rectangle Ellipse +Add(IShape*) +Remove(IShape*) 합성된도형 Sub- N 개 ( 부분 ) 1 개 ( 전체 ) 17

18 Structure Improvement 세부구현 <<interface>> IShape RectangleShape EllipseShape CompositeShape +Add(IShape*) +Remove(IShape*) 18 누락된요구사항 : 도형 () 관리하기 }; class CompositeShape : public IShape private: list<ishape*> m_plist; public: void Add(IShape* pshape) // m_plist 에 pshape 추가 } void Remove(IShape* pshape) // m_plist 에서 pshape 제거 } void Draw(const Graphics& g) list<ishape*>::iterator it = m_plist.begin(); while(it!= m_plist.end()) // } }

19 Structure Improvement <<interface>> IShape RectangleShape EllipseShape CompositeShape +Add(IShape*) +Remove(IShape*) 19 누락된요구사항 : 도형 () 관리하기 요구사항 : 그리기 class CompositeShape : public IShape private: list<ishape*> m_plist; public: void Add(IShape* pshape) void Remove(IShape* pshape) void Draw(const Graphics& g) }; 요구사항재정의 : Rectangle, Ellipse Sub- : 합성 ( 合成 ) 된도형 : 도형 () 관리 : 합성 ( 合成 ) 된도형

20 요구사항 : 그리기 : Rectangle, Ellipse Sub- : 합성 ( 合成 ) 된도형 : 도형 () 관리 : 합성 ( 合成 ) 된도형 OOD 원칙구현 도형 () 관리 ( 외부와의계약, 변화하지않는것 ) 20 Client RectangleShape DIP OCP(LSP) Rectangle 그리기 ( 외부와의계약, 변화하지않는것 ) <<interface>> IShape EllipseShape Ellipse SRP SRP <<interface>> IComposite +Add(IShape*) +Remove(IShape*) CompositeShape OCP(LSP) +Add(IShape*) +Remove(IShape*) 합성된도형 Sub- 합성된도형 DIP AnotherClient

21 Structure Improvement SRP <<interface>> IComposite <<interface>> IShape SRP +Add(IShape*) +Remove(IShape*) AnotherClient Client RectangleShape EllipseShape CompositeShape +Add(IShape*) +Remove(IShape*) - 문제점 : Client 가합성 ( 合成 ) 된도형을구성하기위해 IComposite 에직접접근할수없다. - 원인 : 인터페이스가분리되어있어클라이언트 (Client, AnotherClient) 또한분리되어있다. - 해결책 : SRP(Single Responsibility Principle) 을위반한다. - 효과 : Client 가그리기 () 와합성된도형구성 (Sub-) 작업을구분하지않게된다. 21

22 22 4. SRP(Single Responsibility Principle) Violation

23 SRP(Single Responsibility Principle) Violation SRP <<interface>> IComposite Client <<interface>> IShape SRP +Add(IShape*) +Remove(IShape*) AnotherClient RectangleShape EllipseShape CompositeShape +Add(IShape*) +Remove(IShape*) SRP 위반구현 23 Client RectangleShape +Add(IShape*) +Remove(IShape*) <<interface>> IShape +Add(IShape*) +Remove(IShape*) EllipseShape +Add(IShape*) +Remove(IShape*) SRP 위반 CompositeShape +Add(IShape*) +Remove(IShape*)

24 SRP(Single Responsibility Principle) Violation <<interface>> IShape SRP 위반 Client +Add(IShape*) +Remove(IShape*) RectangleShape +Add(IShape*) +Remove(IShape*) EllipseShape +Add(IShape*) +Remove(IShape*) CompositeShape +Add(IShape*) +Remove(IShape*) 24 class RectangleShape : IShape public: virtual void Add(IShape* pshape) throw _T( no implement ); // nothing } virtual void Remove(IShape* pshape) throw _T( no implement ); // nothing } virtual void Draw(const Graphics& g) // 그리기구현 } }; 불필요한메소드재정의 class EllipseShape : IShape public: virtual void Add(IShape* pshape) throw _T( no implement ); // nothing } virtual void Remove(IShape* pshape) throw _T( no implement ); // nothing } virtual void Draw(const Graphics& g) // 그리기구현 } }; 예외로인하여 LSP 를위반하게된다. ( 예외로파생클래스는기반클래스로치환할수없기때문에 ) 즉, 다형성획득이어려워지므로 OCP 또한준수하기힘들게된다. (LSP 위반으로인해 )

25 SRP(Single Responsibility Principle) Violation 불필요한메소드재정의제거하기 Hook Method 구현 Client SRP 위반 <<abstract>> Shape <<hook>> +Add(Shape*) +Remove(Shape*) class Shape public: virtual void Draw(const Graphics& g) = 0; }; // Hook Method virtual void Add(Shae* pshape) } virtual void Remove(Shape* pshape) } RectangleShape class RectangleShape : IShape public: virtual void Draw(const Graphics& g) // 그리기구현 } }; EllipseShape CompositeShape +Add(Shape*) +Remove(Shape*) 25

26 26 5. Design Pattern

27 Design Pattern 요구사항 : 그리기 : Rectangle, Ellipse Sub- : 합성 ( 合成 ) 된도형 Design Pattern (Decorator) RectangleShape <<interface>> IShape EllipseShape DecoratorShape #DecoratorShape(IShape*) : 도형 () 관리 CompositeShape : 합성 ( 合成 ) 된도형 27 : 그리기 : Rectangle, Ellipse Sub- : 합성 ( 合成 ) 된도형 : 도형 () 관리 : 합성 ( 合成 ) 된도형 OOD 원칙 ( : Sub- = N : 1) SRP 위반 RectangleShape RectangleShape <<interface>> IShape EllipseShape SRP SRP <<abstract>> Shape <<hook>> +Add(Shape*) +Remove(Shape*) EllipseShape <<interface>> IComposite +Add(IShape*) +Remove(IShape*) CompositeShape +Add(IShape*) +Remove(IShape*) SRP 위반 CompositeShape +Add(Shape*) +Remove(Shape*)

28 Design Pattern <<abstract>> Shape <<hook>> +Add(Shape*) +Remove(Shape*) Component RectangleShape Leaf Composite EllipseShape Leaf CompositeShape +Add(Shape*) +Remove(Shape*) Composite Component : 계층구조의모든객체를표현하는인터페이스혹은추상클래스 Composite : 다른컴포넌트를포함할수있는컴포넌트. 서브컴포넌트가 Leaf인지 Composite인지알지못한다. Leaf : 독립형컴포넌트. 다른컴포넌트를포함하지못한다. 컨테이너 / 컨텐츠 ( 전체 / 부분 ) 관계를나타내는런타임객체구조를공통인터페이스를구현하는객체의집합으로조직화한다. 인터페이스를구현하는객체중일부는독립형객체를정의하고, 일부는인터페이스를준수하는다른객체를담을수있는컨테이너를정의한다. 이때컨테이너는컨테이너를포함할수있다. 28 출처 : 실전코드로배우는실용주의디자인패턴 ( 사이텍미디어, 송치형 )

29 29 6. Class Diagram in Practice

30 Class Diagram in Practice Client +Draw() <<abstract>> Shape <<hook>> +Add(Shape*) +Remove(Shape*) RectangleShape EllipseShape CompositeShape +Add(Shape*) +Remove(Shape*) C++ Program Code 로표현해보자! 30

31 Class Diagram in Practice class Shape public: Shape(); virtual ~Shape(); 31 RectangleShape <<abstract>> Shape <<hook>> +Add(Shape*) +Remove(Shape*) EllipseShape public: virtual void Draw(const Graphics& g) = 0; }; // Hook Method virtual void Add(Shape* pshape) } virtual void Remove(Shape* pshape) } class RectangleShape : public Shape public: RectangleShape(); virtual ~RectangleShape(); public: virtual void Draw(const Graphics& g) // 그리기구현 } }; class EllipseShape : public Shape public: EllipseShape(); virtual ~EllipseShape(); public: virtual void Draw(const Graphics& g) // 그리기구현 } };

32 Class Diagram in Practice <<abstract>> Shape class CompositeShape : public Shape public: CompositeShape(); virtual ~CompositeShape(); private: list<shape*> m_plist; <<hook>> +Add(Shape*) +Remove(Shape*) CompositeShape +Add(Shape*) +Remove(Shape*) public: virtual void Draw(const Graphics& g) list<shape>::iterator it = m_plist.begin(); while(it!= m_plist.end()) // 그리기위임 it++; } } }; virtual void Add(Shape* pshape) // m_plist 에 pshape 추가구현 } virtual void Remove(Shape* pshape) // m_plist 에서 pshape 제거구현 } 32

33 Class Diagram in Practice Client +Draw() <<abstract>> Shape <<hook>> +Add(Shape*) +Remove(Shape*) class Client private: Shape* m_pshape; public: Client() m_pshape = new CompositeShape; 33 } } Shape* prectangle = new RectangleShape; Shape* pellipse = new EllipseShape; m_pshape->add(prectangle); m_pshape->add(pellipse); void Draw() Graphics g; } // m_pshape->draw(g); 합성 ( 合成 ) 된도형만들기

34 34 7. Design Pattern in Practice

35 Design Pattern in Practice 요구사항 : Log 데이터를 File 과 Window 모두에게출력 ( 저장 ) 한다.? 합성 ( 合成 ) 된 Stream 합성 ( 合成 ) : 둘이상의것을합쳐서하나를이룸. 요구사항재정리 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. 35

36 Design Pattern in Practice 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. 합성 ( 合成 ) 된 Stream 은 File 과 Window Stream 에출력 ( 저장 ) 하기위한추가책임이다. Sub- 요구사항정리 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. Sub- 36

37 Design Pattern in Practice /Sub- 관계 Sub- 는 의합성 ( 合成 ) 으로이루어진다. 합성 ( 合成 ) : 둘이상의것을합쳐서하나를이룸. 합성된 Stream Sub- File Window 1 개 ( 전체 ) N 개 ( 부분 ) /Sub- 관계정리 Sub- = : : N ( 부분 ) 1 ( 전체 ) 37

38 Design Pattern in Practice 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. Sub- Sub- 는 의추가책임이므로, 의구현은 에게위임한다. Ex. 출력 ( 저장 ) 합성된 Stream Sub- File Window 38 요구사항정리 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. Sub-

39 Design Pattern in Practice : 출력 ( 저장 ) 요구사항 : File, Window Sub- : 합성 ( 合成 ) 된 Stream ( : Sub- = N : 1) Composite Pattern 구현 <<abstract>> OutputStream <<hook>> +Add(OutputStream*) +Remove(OutputStream*) 39 FileOutputStream File WinOutputStream Window CompositeOutputStream +Add(OutputStream*) +Remove(OutputStream*) 합성된 Stream Sub- N 개 ( 부분 ) 1 개 ( 전체 )

40 Design Pattern in Practice 세부요구사항 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. Sub- 요구사항세분화 요구사항 : Log 데이터를 File 과 Window 가합성 ( 合成 ) 된 Stream 에출력 ( 저장 ) 한다. Log 데이터를동기화처리하여 Window 에출력 ( 저장 ) 한다. Log 데이터를동기화처리된 Buffered Memory 를이용하여 File 에출력 ( 저장 ) 한다. 40

41 Design Pattern in Practice 요구사항 : Log 데이터를동기화처리하여 Window 에출력 ( 저장 ) 한다. 동기화처리는 Log 데이터를 Window 에출력 ( 저장 ) 하기위한추가책임이다. Sub- 요구사항정리 요구사항 : Log 데이터를동기화처리하여 Window 에출력 ( 저장 ) 한다. Sub- 41

42 Design Pattern in Practice 요구사항 : Log 데이터를동기화처리하여 Window 에출력 ( 저장 ) 한다. Sub- Sub- 는 의추가책임이므로, 의구현은 에게위임한다. Ex. 출력 ( 저장 ) 동기화처리 Sub- Window 42 요구사항정리 요구사항 : Log 데이터를동기화처리하여 Window 에출력 ( 저장 ) 한다. Sub-

43 Design Pattern in Practice 요구사항 : 출력 ( 저장 ) : File, Window Sub- : 합성 ( 合成 ) 된 Stream, 동기화처리 ( : Sub- = N : 1) ( : Sub- = 1 : N) Decorator Pattern 구현 <<abstract>> OutputStream <<hook>> +Add(OutputStream*) +Remove(OutputStream*) 43 FileOutputStream File WinOutputStream Window CompositeOutputStream +CompositeOutputStream(OutputStream*) +Add(OutputStream*) +Remove(OutputStream*) SyncOutputStream +SyncOutputStream(OutputStream*) #SetSync() #ResetSync() 합성된 Stream Sub- 책임구분 (/Sub- 구분 ) 동기화처리 Sub-

44 Design Pattern in Practice 요구사항 : Log 데이터를동기화처리된 Buffered Memory 를이용하여 File 에출력 ( 저장 ) 한다. 동기화처리는 Buffered Memory 를사용하기위한추가책임이다. Sub- Buffered Memory 는 File 출력 ( 저장 ) 속도향상을위한추가책임이다. 44 요구사항정리 Sub- 요구사항 : Log 데이터를동기화처리된 Buffered Memory 를이용하여 File 에출력 ( 저장 ) 한다. Sub- Sub-

45 Design Pattern in Practice 요구사항 : Log 데이터를동기화처리된 Buffered Memory 를이용하여 File 에출력 ( 저장 ) 한다. Sub- Sub- Sub- 는 의추가책임이므로, 의구현은 에게위임한다. Ex. 동기화처리 Sub- 출력 ( 저장 ) Buffered Memory Sub- File 45 요구사항정리 요구사항 : Log 데이터를동기화처리된 Buffered Memory 를이용하여 File 에출력 ( 저장 ) 한다. Sub- Sub-

46 Design Pattern in Practice 요구사항 : 출력 ( 저장 ) : File, Window Sub- : 합성 ( 合成 ) 된 Stream, 동기화처리, Buffered Memory ( : Sub- = N : 1) ( : Sub- = 1 : N) <<abstract>> OutputStream <<hook>> +Add(OutputStream*) +Remove(OutputStream*) Decorator Pattern 구현 46 FileOutputStream File WinOutputStream Window CompositeOutputStream +CompositeOutputStream(OutputStream*) +Add(OutputStream*) +Remove(OutputStream*) SyncOutputStream +SyncOutputStream(OutputStream*) #SetSync() #ResetSync() 동기화처리 Sub- BufferedOutputStream 합성된 Stream Sub- 책임구분 (/Sub- 구분 ) +BufferedOutputStream(OutputStream*, UINT) #DoWrite(const void*, UINT) #SetFlash() Buffered Memory Sub-

47 Design Pattern in Practice /Sub- 관계 합성된 Stream Sub- 1 개 ( 전체 ) 동기화처리 Sub- N 개 Window 1 개 출력 ( 저장 ) 동기화처리 Sub- Buffered Memory Sub- File Decorator Pattern : Sub- = 1 : N Composite Pattern : Sub- = N : 1 N 개 1 개 N 개 ( 부분 ) 47

48 Design Pattern in Practice File 출력 ( 저장 ) File 과 Window 출력 ( 저장 ) 48 Log* m_plog; OutputStream* pfile = new FileOutputStream; OutputStream* pbuffered = new BufferedOutputStream(pFile); OutputStream* psync = new SyncOutputStream(pBuffered); m_plog->setoutputstream(psync); Code Reuse void Client::Log( ) m_plog->write(lpbuf, nlen); } 재사용가능한설계 Log* m_plog; OutputStream* pstream = new CompositeOutputStream; // Window OutputStream* pwin = new WinOutputStream; OutputStream* psyncwin = new SyncOutputStream(pWin); pstream->add(psyncwin); // File OutputStream* pfile = new FileOutputStream; OutputStream* pbuffered = new BufferedOutputStream(pFile); OutputStream* psyncfile = new SyncOutputStream(pBuffered); pstream->add(psyncfile); m_plog->setoutputstream(pstream); Open-Closed Principle 확장에대해열려있고, 수정에는대해닫혀있다

49 Design Pattern in Practice Pattern Summary Log +SetOutputStream(OutputStream*) Context <<abstract>> OutputStream <<hook>> +Add(OutputStream*) +Remove(OutputStream*) Strategy Component Component Composite Strategy FileOutputStream WinOutputStream CompositeOutputStream 49 Concrete Strategy Concrete Component Leaf Decorator +CompositeOutputStream(OutputStream*) Concrete Strategy +Add(OutputStream*) Concrete Component +Remove(OutputStream*) Leaf Concrete Strategy Decorator Composite SyncOutputStream +SyncOutputStream(OutputStream*) #SetSync() #ResetSync() Concrete Decorator BufferedOutputStream +BufferedOutputStream(OutputStream*, UINT) #DoWrite(const void*, UINT) #SetFlash() Concrete Decorator

50 50 8. Summary

51 Summary Composite Pattern Decorator Pattern SRP <<interface>> IOutputStream SRP 위반 <<abstract>> OutputStream <<hook>> +Add(OutputStream*) +Remove(OutputStream*) VS. FileOutputStream DecoratorOutputStream FileOutputStream WinOutputStream CompositeOutputStream #DecoratorOutputStream(IOutputStream*) +CompositeOutputStream(OutputStream*) +Add(OutputStream*) +Remove(OutputStream*) 1 개 SyncOutputStream BufferedOutputStream N 개 1 개 +SyncOutputStream(IOutputStream*) #SetSync() #ResetSync() +BufferedOutputStream(IOutputStream*, UINT) #DoWrite(const void*, UINT) #SetFlash() : Sub- = N : 1 /Sub- 관계정리 VS. N 개 : Sub- = 1 : N ( 조합 ) (Sub- 추가 ) 51

52 Summary 설계는단순히클래스차원만이아니라, 객체차원으로도접근할수있어야한다. Ex. 객체의메시지흐름 합성된 Stream Sub- 1 개 ( 전체 ) 동기화처리 Sub- N 개 Window 1 개 출력 ( 저장 ) 동기화처리 Sub- Buffered Memory Sub- File N 개 1 개 N 개 ( 부분 ) 52

제목

제목 Object-Oriented Design Agile for Software Development Story 4. 작 성 자 : 고형호 메 일 : hyungho.ko@gmail.com 홈페이지 : 최초작성일 : 2007.06.12 최종작성일 : 2007.08.31 1 2 Goal Flexibility & Reusability Content 1. Flexibility

More information

제목

제목 Object-Oriented Design Agile for Software Development Story 3. 작 성 자 : 고형호 메 일 : hyungho.ko@gmail.com 홈페이지 : 최초작성일 : 2006.10.15 최종작성일 : 2007.09.12 1 Goal Object Oriented Design Principles 2 Contents 1.

More information

제목

제목 Object-Oriented Design Agile for Software Development 소 속 : 미래로시스템 작 성 자 : 고형호 메 일 : hhko@korea.ac.kr 홈페이지 : 1 2 Goal Object-Oriented Design Contents Part 1. Object-Oriented Oriented Modeling 1. Object-Oriented

More information

제목

제목 Development Technology Seminar 작 성 자 : 고형호 이 메 일 : hyungho.ko@gmail.com 최초작성일 : 2007.01.19 최종작성일 : 2007.02.05 버 전 : 01.05 홈 피 : www.innosigma.com Goal Exception Handling 1. SEH vs. CEH Exception Handling

More information

gnu-lee-oop-kor-lec06-3-chap7

gnu-lee-oop-kor-lec06-3-chap7 어서와 Java 는처음이지! 제 7 장상속 Super 키워드 상속과생성자 상속과다형성 서브클래스의객체가생성될때, 서브클래스의생성자만호출될까? 아니면수퍼클래스의생성자도호출되는가? class Base{ public Base(String msg) { System.out.println("Base() 생성자 "); ; class Derived extends Base

More information

JAVA PROGRAMMING 실습 08.다형성

JAVA PROGRAMMING 실습 08.다형성 2015 학년도 2 학기 1. 추상메소드 선언은되어있으나코드구현되어있지않은메소드 abstract 키워드사용 메소드타입, 이름, 매개변수리스트만선언 public abstract String getname(); public abstract void setname(string s); 2. 추상클래스 abstract 키워드로선언한클래스 종류 추상메소드를포함하는클래스

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

오버라이딩 (Overriding)

오버라이딩 (Overriding) WindowEvent WindowEvent 윈도우가열리거나 (opened) 닫힐때 (closed) 활성화되거나 (activated) 비활성화될때 (deactivated) 최소화되거나 (iconified) 복귀될때 (deiconified) 윈도우닫힘버튼을누를때 (closing) WindowEvent 수신자 abstract class WindowListener

More information

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2 객체지향프로그래밍 IT CookBook, 자바로배우는쉬운자료구조 q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2 q 객체지향프로그래밍의이해 v 프로그래밍기법의발달 A 군의사업발전 1 단계 구조적프로그래밍방식 3 q 객체지향프로그래밍의이해 A 군의사업발전 2 단계 객체지향프로그래밍방식 4 q 객체지향프로그래밍의이해 v 객체란무엇인가

More information

Inclusion Polymorphism과 UML 클래스 다이어그램 구조에 의거한 디자인패턴 해석

Inclusion Polymorphism과 UML 클래스 다이어그램 구조에 의거한 디자인패턴 해석 Inclusion Polymorphism 과 UML 클래스다이어그램구조에의거한디자인패턴해석 이랑혁, 이현우, 고석하 rang2guru@gmail.com, westminstor@naver.com, shkoh@cbnu.ac.kr 충북대학교경영정보학과 충북청주시흥덕구개신동 12 번지충북대학교학연산공동기술연구원 843 호 Tel:043-272-4034 55 Keyword

More information

Microsoft PowerPoint - 2강

Microsoft PowerPoint - 2강 컴퓨터과학과 김희천교수 학습개요 Java 언어문법의기본사항, 자료형, 변수와상수선언및사용법, 각종연산자사용법, if/switch 등과같은제어문사용법등에대해설명한다. 또한 C++ 언어와선언 / 사용방법이다른 Java의배열선언및사용법에대해서설명한다. Java 언어의효과적인활용을위해서는기본문법을이해하는것이중요하다. 객체지향의기본개념에대해알아보고 Java에서어떻게객체지향적요소를적용하고있는지살펴본다.

More information

Microsoft PowerPoint - ÀÚ¹Ù08Àå-1.ppt

Microsoft PowerPoint - ÀÚ¹Ù08Àå-1.ppt AWT 컴포넌트 (1) 1. AWT 패키지 2. AWT 프로그램과이벤트 3. Component 클래스 4. 컴포넌트색칠하기 AWT GUI 를만들기위한 API 윈도우프로그래밍을위한클래스와도구를포함 Graphical User Interface 그래픽요소를통해프로그램과대화하는방식 그래픽요소를 GUI 컴포넌트라함 윈도우프로그램만들기 간단한 AWT 프로그램 import

More information

13 Who am I? R&D, Product Development Manager / Smart Worker Visualization SW SW KAIST Software Engineering Computer Engineering 3

13 Who am I? R&D, Product Development Manager / Smart Worker Visualization SW SW KAIST Software Engineering Computer Engineering 3 13 Lightweight BPM Engine SW 13 Who am I? R&D, Product Development Manager / Smart Worker Visualization SW SW KAIST Software Engineering Computer Engineering 3 BPM? 13 13 Vendor BPM?? EA??? http://en.wikipedia.org/wiki/business_process_management,

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 11 장상속 이번장에서학습할내용 상속이란? 상속의사용 메소드재정의 접근지정자 상속과생성자 Object 클래스 종단클래스 상속을코드를재사용하기위한중요한기법입니다. 상속이란? 상속의개념은현실세계에도존재한다. 상속의장점 상속의장점 상속을통하여기존클래스의필드와메소드를재사용 기존클래스의일부변경도가능 상속을이용하게되면복잡한 GUI 프로그램을순식간에작성

More information

MVVM 패턴의 이해

MVVM 패턴의 이해 Seo Hero 요약 joshua227.tistory. 2014 년 5 월 13 일 이문서는 WPF 어플리케이션개발에필요한 MVVM 패턴에대한내용을담고있다. 1. Model-View-ViewModel 1.1 기본개념 MVVM 모델은 MVC(Model-View-Contorl) 패턴에서출발했다. MVC 패턴은전체 project 를 model, view 로나누어

More information

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 24 장입출력 이번장에서학습할내용 스트림이란? 스트림의분류 바이트스트림 문자스트림 형식입출력 명령어행에서입출력 파일입출력 스트림을이용한입출력에대하여살펴봅시다. 스트림 (stream) 스트림 (stream) 은 순서가있는데이터의연속적인흐름 이다. 스트림은입출력을물의흐름처럼간주하는것이다. 스트림들은연결될수있다. 중간점검문제 1. 자바에서는입출력을무엇이라고추상화하는가?

More information

제8장 자바 GUI 프로그래밍 II

제8장 자바 GUI 프로그래밍 II 제8장 MVC Model 8.1 MVC 모델 (1/7) MVC (Model, View, Controller) 모델 스윙은 MVC 모델에기초를두고있다. MVC란 Xerox의연구소에서 Smalltalk 언어를바탕으로사용자인터페이스를개발하기위한방법 MVC는 3개의구성요소로구성 Model : 응용프로그램의자료를표현하기위한모델 View : 자료를시각적으로 (GUI 방식으로

More information

OOP 소개

OOP 소개 OOP : @madvirus, : madvirus@madvirus.net : @madvirus : madvirus@madvirus.net ) ) ) 7, 3, JSP 2 ? 3 case R.id.txt_all: switch (menu_type) { case GROUP_ALL: showrecommend("month"); case GROUP_MY: type =

More information

Microsoft PowerPoint - CSharp-10-예외처리

Microsoft PowerPoint - CSharp-10-예외처리 10 장. 예외처리 예외처리개념 예외처리구문 사용자정의예외클래스와예외전파 순천향대학교컴퓨터학부이상정 1 예외처리개념 순천향대학교컴퓨터학부이상정 2 예외처리 오류 컴파일타임오류 (Compile-Time Error) 구문오류이기때문에컴파일러의구문오류메시지에의해쉽게교정 런타임오류 (Run-Time Error) 디버깅의절차를거치지않으면잡기어려운심각한오류 시스템에심각한문제를줄수도있다.

More information

<C0DAB7E120C7D5BABB2E687770>

<C0DAB7E120C7D5BABB2E687770> 제5회 SW공학 Technical 세미나 패턴 저자와 함께하는 패턴이야기 세부 프로그램 시 간 내 용 강사진 13:30 ~ 14:00 등 록 14:00 ~ 14:05 인사말 14:05 ~ 15:00 15:00 ~ 15:30 15:30 ~ 17:00 o 미워도 다시 보는 패턴이야기 - SW 설계의 패턴과 다양한 패턴의 주제 소개 - 패턴의 3박자와 패턴으로

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

예제 2) Test.java class A intvar= 10; void method() class B extends A intvar= 20; 1"); void method() 2"); void method1() public class Test 3"); args) A

예제 2) Test.java class A intvar= 10; void method() class B extends A intvar= 20; 1); void method() 2); void method1() public class Test 3); args) A 제 10 장상속 예제 1) ConstructorTest.java class Parent public Parent() super - default"); public Parent(int i) this("hello"); super(int) constructor" + i); public Parent(char c) this(); super(char) constructor

More information

09-interface.key

09-interface.key 9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1

More information

PowerPoint Presentation

PowerPoint Presentation Class - Property Jo, Heeseung 목차 section 1 클래스의일반구조 section 2 클래스선언 section 3 객체의생성 section 4 멤버변수 4-1 객체변수 4-2 클래스변수 4-3 종단 (final) 변수 4-4 멤버변수접근방법 section 5 멤버변수접근한정자 5-1 public 5-2 private 5-3 한정자없음

More information

자바GUI실전프로그래밍2_장대원.PDF

자바GUI실전프로그래밍2_장대원.PDF JAVA GUI - 2 JSTORM http://wwwjstormpekr JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: Issued by: Issue Date:

More information

PowerPoint Template

PowerPoint Template 16-1. 보조자료템플릿 (Template) 함수템플릿 클래스템플릿 Jong Hyuk Park 함수템플릿 Jong Hyuk Park 함수템플릿소개 함수템플릿 한번의함수정의로서로다른자료형에대해적용하는함수 예 int abs(int n) return n < 0? -n : n; double abs(double n) 함수 return n < 0? -n : n; //

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Lab 4 ADT Design 클래스로정의됨. 모든객체들은힙영역에할당됨. 캡슐화 (Encapsulation) : Data representation + Operation 정보은닉 (Information Hiding) : Opertion부분은가려져있고, 사용자가 operation으로만사용가능해야함. 클래스정의의형태 public class Person { private

More information

JVM 메모리구조

JVM 메모리구조 조명이정도면괜찮조! 주제 JVM 메모리구조 설미라자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조장. 최지성자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조원 이용열자료조사, 자료작성, PPT 작성, 보고서작성. 이윤경 자료조사, 자료작성, PPT작성, 보고서작성. 이수은 자료조사, 자료작성, PPT작성, 보고서작성. 발표일 2013. 05.

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 인터페이스 배효철 th1g@nate.com 1 목차 인터페이스의역할 인터페이스선언 인터페이스구현 인터페이스사용 타입변환과다형성 인터페이스상속 디폴트메소드와인터페이스확장 2 인터페이스의역할 인터페이스란? 개발코드와객체가서로통신하는접점 개발코드는인터페이스의메소드만알고있으면 OK 인터페이스의역할 개발코드가객체에종속되지않게 -> 객체교체할수있도록하는역할 개발코드변경없이리턴값또는실행내용이다양해질수있음

More information

Slide 1

Slide 1 SeoulTech 2011-2 nd 프로그래밍입문 (2) Chapter 15. 다형성과가상함수 박종혁교수 (http://www.parkjonghyuk.net) Tel: 970-6702 Email: jhpark1@snut.ac.kr Learning Objectives 가상함수 (Virtual Function) 기본 사후바인딩 (late binding) / 동적바인딩

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

Network Programming

Network Programming Part 5 확장된 Network Programming 기술 1. Remote Procedure Call 2. Remote Method Invocation 3. Object Request Broker 2. Java RMI

More information

#KM560

#KM560 KM-560 KM-560-7 PARTS BOOK KM-560 KM-560-7 INFORMATION A. Parts Book Structure of Part Book Unique code by mechanism Unique name by mechanism Explode view Ref. No. : Unique identifcation number by part

More information

Design Issues

Design Issues 11 COMPUTER PROGRAMMING INHERIATANCE CONTENTS OVERVIEW OF INHERITANCE INHERITANCE OF MEMBER VARIABLE RESERVED WORD SUPER METHOD INHERITANCE and OVERRIDING INHERITANCE and CONSTRUCTOR 2 Overview of Inheritance

More information

슬라이드 1

슬라이드 1 UNIT 16 예외처리 로봇 SW 교육원 3 기 최상훈 학습목표 2 예외처리구문 try-catch-finally 문을사용핛수있다. 프로그램오류 3 프로그램오류의종류 컴파일에러 (compile-time error) : 컴파일실행시발생 럮타임에러 (runtime error) : 프로그램실행시발생 에러 (error) 프로그램코드에의해서해결될수없는심각핚오류 ex)

More information

KYO_SCCD.PDF

KYO_SCCD.PDF 1. Servlets. 5 1 Servlet Model. 5 1.1 Http Method : HttpServlet abstract class. 5 1.2 Http Method. 5 1.3 Parameter, Header. 5 1.4 Response 6 1.5 Redirect 6 1.6 Three Web Scopes : Request, Session, Context

More information

05-class.key

05-class.key 5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

5장.key

5장.key JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!

More information

제11장 프로세스와 쓰레드

제11장 프로세스와 쓰레드 제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드

More information

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770> i ii iii iv v vi 1 2 3 4 가상대학 시스템의 국내외 현황 조사 가상대학 플랫폼 개발 이상적인 가상대학시스템의 미래상 제안 5 웹-기반 가상대학 시스템 전통적인 교수 방법 시간/공간 제약을 극복한 학습동기 부여 교수의 일방적인 내용전달 교수와 학생간의 상호작용 동료 학생들 간의 상호작용 가상대학 운영 공지사항,강의록 자료실, 메모 질의응답,

More information

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for 2003 Development of the Software Generation Method using Model Driven Software Engineering Tool,,,,, Hoon-Seon Chang, Jae-Cheon Jung, Jae-Hack Kim Hee-Hwan Han, Do-Yeon Kim, Young-Woo Chang Wang Sik, Moon

More information

About

About Web-based Software Company About Overview Our Service Strategy Consulting R&D Meta Service Meta Creative UI & UX Design Plan & Developme nt 철저한트랜드조사와연구개발에기반한메타브레인의창의적인제안을받아보십시오. History History Our Clients

More information

Microsoft PowerPoint - 06-Chapter09-Event.ppt

Microsoft PowerPoint - 06-Chapter09-Event.ppt AWT 이벤트처리하기 1. 이벤트처리방식 2. 이벤트클래스와리스너 3. 이벤트어댑터 4. 이벤트의종류 이벤트 (Event) 이벤트 사용자가 UI 컴포넌트에대해취하는행위로인한사건이벤트기반프로그래밍 무한루프를돌면서사용자의행위로인한이벤트를청취하여응답하는형태로작동하는프로그래밍 java.awt.event 이벤트처리 AWT 컴포넌트에서발생하는다양한이벤트를처리하기위한인터페이스와클래스제공

More information

No Slide Title

No Slide Title Copyright, 2001 Multimedia Lab., CH 3. COM object (In-process server) Eun-sung Lee twoss@mmlab.net Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul Seoul, Korea 0. Contents 1.

More information

Microsoft PowerPoint - ÀÚ¹Ù08Àå-2.ppt

Microsoft PowerPoint - ÀÚ¹Ù08Àå-2.ppt AWT 컴포넌트 (2) 1. 메뉴 2. 컨테이너와컨트롤 3. 배치관리자 메뉴관련클래스계층구조 Object MenuComponent MenuBar MenuItem Menu CheckboxMenuItem PopupMenu 메뉴 풀다운메뉴 제목표시줄밑의메뉴바를가짐 메뉴만들기과정 MenuBar 객체생성 MenuBar 에추가할 Menu 객체를생성 Menu 에추가할또다른서브

More information

7 LAMPS For use on a flat surface of a type 1 enclosure File No. E Pilot Lamp File No. E Type Classification Diagram - BULB Type Part Mate

7 LAMPS For use on a flat surface of a type 1 enclosure File No. E Pilot Lamp File No. E Type Classification Diagram - BULB Type Part Mate 7 LAMPS For use on a flat surface of a type 1 enclosure File No. E242380 Pilot Lamp File No. E242380 Type Classification Diagram - BULB Type Part Materials 226 YongSung Electric Co., Ltd. LAMPS

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

A Tour of Java V

A Tour of Java V A Tour of Java V Sungjoo Ha April 3rd, 2015 Sungjoo Ha 1 / 28 Review First principle 문제가생기면침착하게영어로구글에서찾아본다. 타입은가능한값의집합과연산의집합을정의한다. 기본형이아니라면이름표가메모리에달라붙는다. 클래스로사용자정의타입을만든다. 프로그래밍은복잡도관리가중요하다. OOP 는객체가서로메시지를주고받는방식으로프로그램을구성해서복잡도관리를꾀한다.

More information

No Slide Title

No Slide Title 상속 이충기 명지대학교컴퓨터공학과 상속 Q: 건설회사는기존아파트와조금다르거나추가적인특징들을가진새아파트를지을때어떻게하는가? A: 2 상속 상속 (inheritance) 은클래스들을연관시키는자연스럽고계층적인방법이다. 상속은객체지향프로그래밍의가장중요한개념중의하나이다. 상속은 은 이다 라는관계 (is-a relationship) 를나타낸다. 이관계를적용하여클래스들을상하관계로연결하는것이상속이다.

More information

Java Programing Environment

Java Programing Environment Lab Exercise #7 Swing Component 프로그래밍 2007 봄학기 고급프로그래밍 김영국충남대전기정보통신공학부 실습내용 실습과제 7-1 : 정규표현식을이용한사용자정보의유효성검사 (ATM 에서사용자등록용도로사용가능 ) 실습과제 7-2 : 숫자맞추기게임 실습과제 7-3 : 은행관리프로그램 고급프로그래밍 Swing Component 프로그래밍 2

More information

어댑터뷰

어댑터뷰 04 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adatper View) 란? u 어댑터뷰의항목하나는단순한문자열이나이미지뿐만아니라, 임의의뷰가될수 있음 이미지뷰 u 커스텀어댑터뷰설정절차 1 2 항목을위한 XML 레이아웃정의 어댑터정의 3 어댑터를생성하고어댑터뷰객체에연결

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 5 장생성자와접근제어 1. 객체지향기법을이해한다. 2. 클래스를작성할수있다. 3. 클래스에서객체를생성할수있다. 4. 생성자를이용하여객체를초기화할수 있다. 5. 접근자와설정자를사용할수있다. 이번장에서만들어볼프로그램 생성자 생성자 (constructor) 는초기화를담당하는함수 생성자가필요한이유 #include using namespace

More information

Microsoft PowerPoint - 1주차 UML의 구성과 도구

Microsoft PowerPoint - 1주차 UML의 구성과 도구 UML의 구성과 도구 v UML(Unified Modeling Language) v UML의 구성 요소 v UML의 관계 v UML의 다이어그램 v UML 도구 UML(Unified Modeling Language) l 모델링 과정(modeling process)과 모델링 언어(modeling language)를 제안 모델링 과정 : 객체지향으로 분석하고 설계하는

More information

Something that can be seen, touched or otherwise sensed

Something that can be seen, touched or otherwise sensed Something that can be seen, touched or otherwise sensed Things about an object Weight Height Material Things an object does Pen writes Book stores words Water have Fresh water Rivers Oceans have

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

C++ Programming

C++ Programming C++ Programming 상속과다형성 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 상속의이해 상속과다형성 다중상속 2 상속과다형성 객체의이해 상속클래스의객체의생성및소멸 상속의조건 상속과다형성 다중상속 3 상속의이해 상속 (Inheritance) 클래스에구현된모든특성 ( 멤버변수와멤버함수 )

More information

2 단계 : 추상화 class 오리 { class 청둥오리 extends 오리 { class 물오리 extends 오리 { 청둥오리 mallardduck = new 청둥오리 (); 물오리 redheadduck = new 물오리 (); mallardduck.swim();

2 단계 : 추상화 class 오리 { class 청둥오리 extends 오리 { class 물오리 extends 오리 { 청둥오리 mallardduck = new 청둥오리 (); 물오리 redheadduck = new 물오리 (); mallardduck.swim(); 인터페이스적용 오리객체설계하기 ) 청둥오리, 물오리를설계하세요. 1 단계 : 필요한객체설계 class 청둥오리 { class 물오리 { 청둥오리 mallardduck = new 청둥오리 (); 물오리 redheadduck = new 물오리 (); mallardduck.swim(); mallardduck.fly(); mallardduck.quack(); redheadduck.swim();

More information

유니티 변수-함수.key

유니티 변수-함수.key C# 1 or 16 (Binary or Hex) 1:1 C# C# (Java, Python, Go ) (0101010 ). (Variable) : (Value) (Variable) : (Value) ( ) (Variable) : (Value) ( ) ; (Variable) : (Value) ( ) ; = ; (Variable) : (Value) (Variable)

More information

Microsoft PowerPoint - java2 [호환 모드]

Microsoft PowerPoint - java2 [호환 모드] 10 장객체- 지향프로그래밍 II 창병모 1 상속 창병모 2 상속 (Inheritance) 상속이란무엇인가? 기존의클래스로부터새로운클래스를유도하는것 자식클래스는부모클래스의메쏘드와데이터를상속 자식클래스에새로운변수나메쏘드를추가할수있다. 기존클래스 부모클래스 (parent class), 수퍼클래스 (superclass), 기반클래스 (base class) 유도클래스

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx 2018 학년도 1 학기 JAVA 프로그래밍 II 514760-1 2018 년봄학기 5/10/2018 박경신 Lab#1 (ImageTest) Lab#1 은영상파일 (Image) 을읽어서정보를출력 Java Tutorials Lesson: Working with Images https://docs.oracle.com/javase/tutorial/2d/images/index.html

More information

Microsoft PowerPoint 자바-AWT컴포넌트(Ch8).pptx

Microsoft PowerPoint 자바-AWT컴포넌트(Ch8).pptx 5. 배치관리자 1 AWT 컴포넌트 1. AWT 프로그램과이벤트 2. Component 클래스 3. 메뉴 4. 컨테이너와컨트롤 AWT AWT: Abstract t Window Toolkit GUI 를만들기위한 API 윈도우프로그래밍을위한클래스와도구를포함 Graphical User Interface 그래픽요소를통해프로그램과대화하는방식 그래픽요소를 GUI 컴포넌트라함

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 11 장상속 1. 상속의개념을이해한다. 2. 상속을이용하여자식클래스를작성할수있다. 3. 상속과접근지정자와의관계를이해한다. 4. 상속시생성자와소멸자가호출되는순서를이해한다. 이번장에서만들어볼프로그램 class Circle { int x, y; int radius;... class Rect { int x, y; int width, height;... 중복 상속의개요

More information

03.Agile.key

03.Agile.key CSE4006 Software Engineering Agile Development Scott Uk-Jin Lee Division of Computer Science, College of Computing Hanyang University ERICA Campus 1 st Semester 2018 Background of Agile SW Development

More information

gnu-lee-oop-kor-lec10-1-chap10

gnu-lee-oop-kor-lec10-1-chap10 어서와 Java 는처음이지! 제 10 장이벤트처리 이벤트분류 액션이벤트 키이벤트 마우스이동이벤트 어댑터클래스 스윙컴포넌트에의하여지원되는이벤트는크게두가지의카테고리로나누어진다. 사용자가버튼을클릭하는경우 사용자가메뉴항목을선택하는경우 사용자가텍스트필드에서엔터키를누르는경우 두개의버튼을만들어서패널의배경색을변경하는프로그램을작성하여보자. 이벤트리스너는하나만생성한다. class

More information

슬라이드 1

슬라이드 1 이벤트 () 란? - 사용자가입력장치 ( 키보드, 마우스등 ) 등을이용해서발생하는사건 - 이벤트를처리하는프로그램은이벤트가발생할때까지무한루프를돌면서대기상태에있는다. 이벤트가발생하면발생한이벤트의종류에따라특정한작업을수행한다. - 이벤트관련프로그램작성을위해 java.awt.event.* 패키지가필요 - 버튼을누른경우, 1 버튼클릭이벤트발생 2 발생한이벤트인식 ( 이벤트리스너가수행

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 File Class File 클래스 파일의읽고쓰기를제외하고파일과디렉토리에대한필요한많은기능등을제공 파일과디렉토리의정보를조사하고, 이들을생성및삭제하는메소드등이 File 클래스에포함 File 클래스의생성자 File(File parent, String child) File(String pathname)

More information

소프트웨어공학 Tutorial #2: StarUML Eun Man Choi

소프트웨어공학 Tutorial #2: StarUML Eun Man Choi 소프트웨어공학 Tutorial #2: StarUML Eun Man Choi emchoi@dgu.ac.kr Contents l StarUML 개요 l StarUML 소개및특징 l 주요기능 l StarUML 화면소개 l StarUML 설치 l StarUML 다운 & 설치하기 l 연습 l 사용사례다이어그램그리기 l 클래스다이어그램그리기 l 순서다이어그램그리기 2

More information

CONTENTS SUMMARY PART 1 MARKET MARKET STRATEGY MARKET ISSUE MARKET ISSUE PART 2 CREDIT CREDIT ISSUE CREDIT ISSUE CREDIT ISSUE CREDIT ISSUE CREDIT STRA

CONTENTS SUMMARY PART 1 MARKET MARKET STRATEGY MARKET ISSUE MARKET ISSUE PART 2 CREDIT CREDIT ISSUE CREDIT ISSUE CREDIT ISSUE CREDIT ISSUE CREDIT STRA CONTENTS SUMMARY PART 1 MARKET MARKET STRATEGY MARKET ISSUE MARKET ISSUE PART 2 CREDIT CREDIT ISSUE CREDIT ISSUE CREDIT ISSUE CREDIT ISSUE CREDIT STRATEGY 4 CREDIT ISSUE 89 90 91 92 93 94 95 96 97 98 99

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

(Microsoft PowerPoint - 11\300\345.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - 11\300\345.ppt [\310\243\310\257 \270\360\265\345]) 입출력 C++ 의효율적인입출력방법을배워보자. 이장에서다룰내용 1 cin 과 cout 을이용한입출력 2 입출력연산자중복 3 조작자생성 4 파일입출력 01_cin 과 cout 을이용한입출력 포맷입출력 C++ 의표준입출력은 cin, cout 을사용한다. C 의 printf 는함수이므로매번여러인자를입력해줘야하지만, cin/cout 에서는형식을한번만정의하면계속사용할수있다.

More information

ETL_project_best_practice1.ppt

ETL_project_best_practice1.ppt ETL ETL Data,., Data Warehouse DataData Warehouse ETL tool/system: ETL, ETL Process Data Warehouse Platform Database, Access Method Data Source Data Operational Data Near Real-Time Data Modeling Refresh/Replication

More information

U.Tu System Application DW Service AGENDA 1. 개요 4. 솔루션 모음 1.1. 제안의 배경 및 목적 4.1. 고객정의 DW구축에 필요한 메타정보 생성 1.2. 제품 개요 4.2. 사전 변경 관리 1.3. 제품 특장점 4.3. 부품화형

U.Tu System Application DW Service AGENDA 1. 개요 4. 솔루션 모음 1.1. 제안의 배경 및 목적 4.1. 고객정의 DW구축에 필요한 메타정보 생성 1.2. 제품 개요 4.2. 사전 변경 관리 1.3. 제품 특장점 4.3. 부품화형 AGENDA 1. 개요 4. 솔루션 모음 1.1. 제안의 배경 및 목적 4.1. 고객정의 DW구축에 필요한 메타정보 생성 1.2. 제품 개요 4.2. 사전 변경 관리 1.3. 제품 특장점 4.3. 부품화형 언어 변환 1.4. 기대 효과 4.4. 프로그램 Restructuring 4.5. 소스 모듈 관리 2. SeeMAGMA 적용 전략 2.1. SeeMAGMA

More information

PowerPoint Template

PowerPoint Template 9. 객체지향프로그래밍 대구가톨릭대학교 IT 공학부 소프트웨어공학연구실 목차 2 9.1 개요 9.2 객체지향프로그래밍언어 9.3 추상자료형 9.4 상속 9.5 동적바인딩 9.1 객체지향의개념 (1) 3 객체지향의등장배경 소프트웨어와하드웨어의발전불균형 소프트웨어모듈의재사용과독립성을강조 객체 (object) 란? 우리가다루는모든사물을일컫는말 예 ) 하나의점, 사각형,

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 20 장패키지 이번장에서학습할내용 패키지의개념 패키지로묶는방법 패키지사용 기본패키지 유틸리티패키지 패키지는연관된클래스들을묶는기법입니다. 패키지란? 패키지 (package) : 클래스들을묶은것 자바라이브러리도패키지로구성 ( 예 ) java.net 패키지 네트워크관련라이브러리 그림 20-1. 패키지의개념 예제 패키지생성하기 Q: 만약패키지문을사용하지않은경우에는어떻게되는가?

More information

bn2019_2

bn2019_2 arp -a Packet Logging/Editing Decode Buffer Capture Driver Logging: permanent storage of packets for offline analysis Decode: packets must be decoded to human readable form. Buffer: packets must temporarily

More information

자바 웹 프로그래밍

자바 웹 프로그래밍 Chapter 00. 강의소개 Chapter 01. Mobile Application Chapter 02. 기본프로그래밍 강의내용최근큰인기를끌고있는 Mobile Application 에관한소개및실제이를위한개발방법을소개하며, Application 개발에관한프로그래밍을간략히진행 강의목표 - 프로그래밍의기본흐름이해 - 창의 SW 설계에서프로그래밍을이용한프로젝트진행에도움을주기위함

More information

No Slide Title

No Slide Title 사건처리와 GUI 프로그래밍 이충기 명지대학교컴퓨터공학과 사건 사건은우리가관심을가질지모르는어떤일이일어나는것을나타내는객체이다. 예를들면, 다음이일어날때프로그램이어떤일을수행해야하는경우에사건이발생한다 : 1. 마우스를클릭한다. 2. 단추를누른다. 3. 키보드의키를누른다. 4. 메뉴항목을선택한다. 2 사건 사건은컴포넌트에서사용자나시스템에의하여발생하는일이다. 자바는사건을나타내는많은사건클래스를제공한다.

More information

Microsoft PowerPoint - 11_DesignPatterns(2010).ppt [호환 모드]

Microsoft PowerPoint - 11_DesignPatterns(2010).ppt [호환 모드] LECTURE 11 디자인패턴 최은만, CSE 4039 소프트웨어공학 설계작업에대한도전 소프트웨어설계는어려운일 문제를잘분할하고 유연하고잘모듈화된우아한디자인이되어야함 설계는시행착오 (trial and error) 의결과 성공적인설계가존재 두설계가똑같은일은없음 반복되는특성 최은만, CSE 4039 소프트웨어공학 2 디자인패턴 디자인패턴은공통된소프트웨어문제에오래동안사용되어검증된솔루션

More information

JAVA PROGRAMMING 실습 09. 예외처리

JAVA PROGRAMMING 실습 09. 예외처리 2015 학년도 2 학기 예외? 프로그램실행중에발생하는예기치않은사건 예외가발생하는경우 정수를 0으로나누는경우 배열의크기보다큰인덱스로배열의원소를접근하는경우 파일의마지막부분에서데이터를읽으려고하는경우 예외처리 프로그램에문제를발생시키지않고프로그램을실행할수있게적절한조치를취하는것 자바는예외처리기를이용하여예외처리를할수있는기법제공 자바는예외를객체로취급!! 나뉨수를입력하시오

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

Microsoft PowerPoint App Fundamentals[Part1](1.0h).pptx

Microsoft PowerPoint App Fundamentals[Part1](1.0h).pptx To be an Android Expert 문양세강원대학교 IT 대학컴퓨터학부 애플리케이션기초 애플리케이션컴포넌트 액티비티와태스크 Part 1 프로세스와쓰레드 컴포넌트생명주기 Part 2 2 Library Java (classes) aapk.apk (android package) identifiers Resource & Configuration aapk: android

More information

Microsoft PowerPoint - chap11

Microsoft PowerPoint - chap11 10 장객체 - 지향프로그래밍 II 상속 상속 (Inheritance) 상속이란무엇인가? 기존의클래스로부터새로운클래스를유도하는것 자식클래스는부모클래스의메쏘드와데이터를상속 자식클래스에새로운변수나메쏘드를추가할수있다. 기존클래스 부모클래스 (parent class), 수퍼클래스 (superclass), 기반클래스 (base class) 유도클래스 자식클래스 (child

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f… Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue

More information

소프트웨어공학개론 강의 11: UML 코드매핑 최은만동국대학교컴퓨터공학과

소프트웨어공학개론 강의 11: UML 코드매핑 최은만동국대학교컴퓨터공학과 소프트웨어공학개론 강의 11: UML 코드매핑 최은만동국대학교컴퓨터공학과 구현작업 l 작업이후본격적으로시스템을구축하는단계 l 프로그램, 즉코드모듈을구축하는과정 2 2 StarUML 코드생성 l Tools->Java->Generate Code 3 정적모델의구현 l 설계를프로그램으로매핑 l 클래스다이어그램과패키지다이어그램이프로그램과밀접 l 추상수준에따라구현에도움이되는정도가다름

More information

뇌를 자극하는 JSP & Servlet 슬라이드

뇌를 자극하는 JSP & Servlet 슬라이드 속성 & 리스너 JSP & Servlet 2/39 Contents 학습목표 클라이언트요청에의해서블릿이실행될때에컨테이너에의해제공되는내장객체의종류와역할, 그리고접근범위특성등을알아본다. 웹컴포넌트사이의데이터전달을위한내장객체에서의속성설정과이에따른이벤트처리방법에대해알아본다. 내용 서블릿의초기화환경을표현하는 ServletConfig 객체 웹애플리케이션의실행환경을표현하는

More information

UML

UML Introduction to UML Team. 5 2014/03/14 원스타 200611494 김성원 200810047 허태경 200811466 - Index - 1. UML이란? - 3 2. UML Diagram - 4 3. UML 표기법 - 17 4. GRAPPLE에 따른 UML 작성 과정 - 21 5. UML Tool Star UML - 32 6. 참조문헌

More information

<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 19 장배치관리자 이번장에서학습할내용 배치관리자의개요 배치관리자의사용 FlowLayout BorderLayout GridLayout BoxLayout CardLayout 절대위치로배치 컨테이너안에서컴포넌트를배치하는방법에대하여살펴봅시다. 배치관리자 (layout manager) 컨테이너안의각컴포넌트의위치와크기를결정하는작업 [3/70] 상당히다르게보인다.

More information

JAVA PROGRAMMING 실습 07. 상속

JAVA PROGRAMMING 실습 07. 상속 상속 부모클래스에정의된필드와메소드를자식클래스가물려받는것 슈퍼클래스 (superclass) 특성을물려주는상위클래스 서브클래스 (subclass) 특성을물려받는하위클래스 슈퍼클래스에자신만의특성 ( 필드, 메소드 ) 추가 슈퍼클래스의특성 ( 메소드 ) 을수정 = 오버라이딩구체화 class Phone 전화걸기전화받기 class MobilePhone 전화걸기전화받기무선기지국연결배터리충전하기

More information

슬라이드 1

슬라이드 1 201111339 김민우 201111344 김재엽 201211386 최하나 1 UML 이란 2 UML 특징 3 UML 의구성요소 3.1 UML Building Blocks 구성요소 사물 (Things) 관계 (Relationship) 다이어그램 (Diagram) 4 UML 모델링 Tools : CASE UML(Unified Modeling Language)

More information