학습목표 l 옵서버패턴 l 상태패턴 l 커맨드패턴 l 실습문제 2

Size: px
Start display at page:

Download "학습목표 l 옵서버패턴 l 상태패턴 l 커맨드패턴 l 실습문제 2"

Transcription

1 객체지향설계와패턴 Lecture #13: 행위패턴 (2) Eun Man Choi

2 학습목표 l 옵서버패턴 l 상태패턴 l 커맨드패턴 l 실습문제 2

3 Pattern #16 옵서버패턴 한객체에의하여영향받는객체들을정리하는데사용 l 패턴요약 l 단일객체가영향받는객체집합에대하여같은이름의메소드를호출하여구현 l 관찰대상객체가관찰하는객체가몇개인지어떤클래스인지모름 3

4 옵서버패턴 : 동기 당신은기업정보입출력프로그램을개발중이다. 이프로그램을이용하여사용자들은 DB 에저장되어있는기업정보 ( 월판매액, 매출증가량, ) 를여러가지형태 ( 도표, 꺾은선그래프, 막대그래프,..) 로볼수있어야한다. 또한관리자들이특정기업정보를갱신한다면해당정보를보여주고있는모든 View 들은변경된정보를다시반영하여보여주어야한다. 기업정보 (Model) 과보여주는화면 (View) 과의관계를어떻게설계할것인가? data 값이변경된다면 view-1, view-2 가변경된값을반영하도록 4

5 옵서버패턴 : 동기 [ 해결방안 ] l Model(data) 이변경되면이를각 view( 화면 ) 들에게알려줌 Model a:45 b:35 c:20 View-1: PieChart View-2: BarChart 값변동시 Model 은 view-1, view-2 에변동사실을통지함 l Model 은자신의정보변경에대한 notification 을받기를원하는뷰들에대한레퍼런스를가지고있어야한다. Model 에는뷰들을등록하고관리할수있는인터페이스가필요 - Attach(View *): 통지받을 view 등록 - Detach(View *): 통지받을 view 등록해제 - Notify(): 변경발생시등록된 view 들에게통보 5

6 옵서버패턴 : 동기 [ 해결방안 ] -2 l 정보변경통보를받은뷰들은모델 l 에게서변경된정보를얻어옴 Model a:45 b:35 c:20 GetValues GetValues View-1: PieChart View-2: BarChart l 각뷰들은자신이필요로하는모델에대한레퍼런스를가지고있으며, 모델에게원하는정보를얻어올수있다. 6

7 옵서버패턴 : 동기 [ 해결방안 ] -3 Notify() 변화발생 7

8 옵서버패턴 : 동기 [ 해결방안 ] -4 l Model class 도향후확장을고려하여 class hierarchy 로구성 l Observer pattern 에서는통지하는역할을 Subject, 통지받는역할을 Observer 라고얘기함. Subject Observer 8

9 옵서버패턴 l 의도 l 별칭 l 한객체의상태가변하면관련된다른모든객체들이해당상태변화를알수있도록객체들간의 one-to-many 의존관계를정의한다. l Dependents, Publish-Subscribe l 적용범위 l 시스템의한부분이다른부분에의존적일때, 양자를개별적인객체로만들고 Observer pattern 을적용하면, 독립성과재사용성을높일수있다. l 한객체의상태가변경되면다른객체들도따라변경될필요가있을때, 그리고, 얼마나많은객체들이따라서변경되어야하는지알필요가없을때. l 변경을알리는객체와변경을통지받는객체간의연결강도를줄일때 9

10 옵서버패턴 l Structure 10

11 옵서버패턴 l 참여요소 l Subject 통지받을 Observer 객체들을알고있다. Observer 객체들을추가하고삭제하는 interface 를제공한다. Attach(), Detach() l Observer(View) 상태변경통지를받을 interface 를정의한다. - Update() l ConcreteSubject(Model) ConcreteObserver 객체들이필요로하는정보를가지고있다. 정보가변경되면등록된 Observer 객체들에게통보한다. l ConcreteObserver(BarChart, PieChart) 필요한정보를가지고있는 ConcreteSubject 객체를알고있다. 상태변경통지를받으면 ConcreteSubject 객체에게변경된정보를얻어온다. 11

12 옵서버패턴 l 협동관계 12

13 옵서버패턴 l 결과 l Subject 객체와 Observer 객체간의 coupling 을줄임 Subject 객체는단지 Observer 객체 list 를가지고있다는정도만알면된다. Subject class 와 Observer class 가서로독립적으로변경및확장될수있다. l Broadcast 통신에도이용가능 Observer 객체들이원하는 subject 객체에등록하지않고, subject 의상태가변화되면전체객체들에게상태변화를 broadcast함 l 예상치못한 updates 발생가능 관찰자객체들 (Observers) 간에는상호존재를인식하지못하기때문에, 한 Subject 객체의상태변화가전체적으로어느정도만큼의 Observer 변화비용이드는지알지못함 13

14 옵서버패턴 l 구현 l Mapping subjects to their observers Subject 객체가 Observer 객체들을관리하는방식은? The simplest way: Subject 객체가 Observer reference 를포함 Subject 객체가많고 Observer 객체가적다면 Subject 가가지고있을 Observer references 가중복되어메모리낭비가발생한다 ( 대안 : Hash Table). l Observing more than one subject 필요로하는정보의종류에따라, 한 Observer 객체가통지를원하는 Subject 객체를여러개둘수있다. 변경통지가왔을때어떤 Subject 객체에서온통지인지확인은? Update() 함수의인자로통지를보내는 Subject 객체를넘김 l Who triggers the update? 1. Subject 의내부변수값변경시자동으로 Notify() 호출하기 2. Client 에서 Notify() 함수를직접호출하기 14

15 옵서버패턴 l Dangling references to deleted subjects 특정 Subject 객체가소멸된다면, 이객체를 reference하고있는 Observer 객체들은어떻게할것인가? 소멸되는 Subject 객체에등록된 Observer들에게 Subject가소멸됨을통지해주어야함 l Making sure Subject state is self-consistent before notification Subject 객체의 Notify() 호출되기전에 Subject 객체내부상태값은일관성을유지하여야한다. l Avoiding observer-specific update protocol Subject 객체는단지 Update() 호출을통하여상태변화만알려주고, 실제 Subject 객체의정보를얻어오는작업은 ConcreteObserver 객체들이맡게되면, 속도면에서는조금손해나 Subject-Observer 간의연결강도 (coupling) 은낮아진다 (Pull Model) Subject 객체가상태변화를통지하기위하여 Observer 객체들의 Update() 함수를호출할때변화된값도같이넘겨준다면속도는높일수있으나 Subject-Observer 간의연결강도가높아진다 (Push Model) 15

16 옵서버패턴 l Specifying modifications of interest explicitly 특정 Observer 객체의경우, Subject 객체의정보들중일부에만관심이있을경우에는? Observer 객체가 Subject 객체의 Attach() 를호출하여자신을등록할때관심이있는세부정보에대한선택도같이넘겨야한다. Subject 객체의내부정보에변경이일어났을때, 해당항목에관련된 Observer 들에게만선택적으로통지한다. l Encapsulating complex update semantics 다수의 Subject 객체와 Observer 객체들간의관계가특별히복잡하고비효율적이라면, 변경통보와변경값반영을전담해주는 ChangeManager 같은별도의객체를둘수있다. 16

17 옵서버패턴 : 사례 #1 l Sample Code l ClockTimer(ConcreteSubject) 시간정보를가지고있으며시간을보여주는객체에시간변경을알림 l DigitalClock, AnalogClock(ConcreteObserver) ClockTimer에서시간정보를가져와서화면에보여주는역할 Subject Observer ClockTimer DigitalClock AnalogClock 17

18 옵서버패턴 : 사례 #1 class Subject { public: virtual ~Subject(); virtual void Attach(Observer* o) { _observers->append(o); virtual void Detach(Observer* o) { _observers->remove(o); virtual void Notify() { ListIterator<Observer*> i(_observers); for (i.first();!i.isdone(); i.next()) i.currentitem()->update(this); protected: Subject(); private: List<Observer*> *_observers; ; Iterator 를이용하여등록한모든 Observer 객체들에게변화를알림 class ClockTimer : public Subject { public: ClockTimer(); virtual int GetHour(); // return Hour virtual int GetMinute(); // return Minute virtual int GetSecond(); // return Second void Tick() { // update internal time-keeping state //... Notify(); ; 18 상태변화발생 Notify() 함수호출

19 옵서버패턴 : 사례 #1 class DigitalClock: public Widget, public Observer { public: DigitalClock(ClockTimer* s) { class AnalogClock : public Widget, public Observer { _subject = s; public: _subject->attach(this); AnalogClock(ClockTimer*); virtual void Update(Subject*); virtual ~DigitalClock() { virtual void Draw(); _subject->detach(this); //... ; virtual void Update(Subject* thechangedsubject) { if (thechangedsubject == _subject) Draw(); virtual void Draw() { // get the new values from the subject int hour = _subject->gethour(); int minute = _subject->getminute(); // etc. // draw the digital clock private: ClockTimer* _subject; ; 19 필요정보를가지고있는객체가변경을통보하였으면다시그림 // Client Code ClockTimer* timer = new ClockTimer; AnalogClock* analogclock = new AnalogClock(timer); DigitalClock* digitalclock = new DigitalClock(timer); timer->tick(); // updates analogclock & digitalclock.

20 옵서버패턴 : 사례 #1 l 적용사례 l Smalltalk Model/View/Controller(MVC) l ET++, THINK library l InterViews, Andrew Toolkit, Unidraw: user interface part l 관련패턴 l Mediator: Observer pattern 에서변경통보와변경값반영을전담해주는 ChangeManager 같은별도의객체를두는경우, 이객체는 Subject 객체와 Observer 객체들사이의상호작용을조절하는 Mediator 역할을수행한다. l Singleton: ChangeManager 같은경우일반적으로하나의객체만생성하기때문에 Singleton pattern을사용할수있다. 20

21 옵서버패턴 : 사례 #2(Mutual Fund) Note: HiGrowthMutualFund starts with 3 shares of Awesome, assumes price of 1.0, and has non-awesome holdings totalling Note: MedGrowthMutualFund starts with 2 shares of Awesome, assumes price of 1.0, and has non-awesome holdings totalling Note: LoGrowthMutualFund starts with 1 shares of Awesome, assumes price of 1.0, and has non-awesome holdings totalling Enter 'quit': Any other input to continue. go on Enter the current price of Awesome Inc. in decimal form Value of Lo Growth Mutual Fund changed from to Value of Med Growth Mutual Fund changed from to Value of Hi Growth Mutual Fund changed from to Enter 'quit': Any other input to continue. go on Enter the current price of Awesome Inc. in decimal form Value of Lo Growth Mutual Fund changed from to Value of Med Growth Mutual Fund changed from to Value of Hi Growth Mutual Fund changed from to Enter 'quit': Any other input to continue. 21

22 Observer Example: Mutual Funds Observable notifyobservers() Observer update( Observable, Object ) Setup MutualFund value numawesomeshares Key: 22 Client Java API Class Developer Class AwesomeInc price LongTermMutualFund. MediumTermMutualFund update( ). HiGrowthMutualFund update( ). update( )

23 Pattern #17 상태패턴 객체의상태에의하여결정된방법으로객체를동작하게할때사용 l 패턴요약 l 상태객체를따로만들어포함하게하고상태객체에게위임하여동작하게함 23

24 상태패턴 - 동기 당신은새로운프로젝트의프로그램 reviewer 책임을맡았다. Reviewer 로당신은팀원들이개발한핵심코드를살펴보고, 논리상의문제점이나좋지않은설계구조를지적해주어야한다. 오늘살펴본코드에는, 특정객체가자신의상태에따라다른행동을하기위하여 if 문장을많이사용하였다. 그러다보니, 함수의크기가커지고객체상태가많은경우해당객체의구현이더욱복잡해졌다. 개발자에게조언해줄해결방법은? 함수내에서단순상태변수값으로행동을나누어실행하는코드를어떻게개선할수있을까? 24

25 상태패턴 - 동기 [ 해결방안 ] l 객체의가능한상태개수만큼 State class 를작성한다. 예 ) Socket 연결을대표하는 TCPConnection class 가가질수있는상태를 Established( 연결 ), Listen( 대기 ), Closed( 끊김 ) 라고가정하면각각 TCPEstablished, TCPListen, TCPClosed class 를만든다. TCPState TCPEstablished TCPClosed TCPListen l 일반적으로 State class 의 interface 는특정상태에따라객체의행위가달라지는함수들을포함한다. TCPConnection ActiveOpen() PassiveOpen() Close() Transmit() GetOption() TCPState ActiveOpen() PassiveOpen() Close() Transmit() 상태에따라다르게동작하는함수들 25

26 상태패턴 - 동기 l TCPConnection class 와 State class 에자신의상태를변화시킬수있는 ChangeState() 함수를추가한다. TCPConnection ActiveOpen() PassiveOpen() Close() Transmit() GetOption() ChangeState() TCPState ActiveOpen() PassiveOpen() Close() Transmit() ChangeState() l State 객체가 TCPConnection 객체를알수있도록한다. 함수를호출할때인자로 TCPConnection 객체를넘겨주던가, 아니면각 State 객체가생성될때 TCPConnection 객체 reference 를가지든가. à 여기서는전자로 TCPState ActiveOpen(TCPConnection *) PassiveOpen(TCPConnection *) Close(TCPConnection *) Transmit(TCPConnection *, TCPStream *) ChangeState(TCPConnection *, TCPState *) 26

27 상태패턴 - 동기 l 상태변수대신초기 State 객체를가진다. class TCPConnection { TCPState *_state; ; TCPConnection::TCPConnection() { _state = new TCPClosed(); // 초기상태 l 상태변수값에따라분기되는각행위들을제각기분리하여위에서만든각 State class 에집어넣는다. 27 TCPConnection::Transmit() { if (state==closed) { else if (state==established) { else if ( state== LISTEN) { TCPClosed::Transmit(TCPConnection *t) { TCPEstablished::Transmit(TCPConnection *t) { TCPListen::Transmit(TCPConnection *t) {

28 상태패턴 - 동기 l 기존객체의상태에의존적인함수는 State 객체로의 delegation 으로구현한다. TCPConnection::Transmit() { if (state==closed) { else if (state==established) { else if ( state== LISTEN) { TCPConnection::Transmit() { _state->transmit(); TCPConnection 객체가가지고있는 State객체 28

29 상태패턴 - 동기 l TCPConnection 객체의상태변화는내부함수나 State 객체에서만일으킬수있다 (ChangeState() 를 private 으로 ). aclient atcpconnection ChangeState() atcpstate l TCPConnection 객체상태변화예 29 void TCPConnection::ChangeState(TCPState *s) { delete _state; _state = s; void TCPState::ChangeState(TCPConnection *t, TCPState *s) { t->changestate(t, s); void TCPClosed::ActiveOpen(TCPConnection *t) { // do connection operation. ChangeState(t, new TCPEstablished );

30 상태패턴 - 동기 l State 객체가독자적인정보를가지지않는다면, 객체를여러개가질필요는없음. State 객체는특정객체의행위들을각상태에따라모아놓은것이기때문에단순함수집합으로간주해도됨 Singleton pattern 활용 앞의예에서 Singleton pattern 을사용한모습 void TCPConnection::ChangeState(TCPState *s) { _state = s; void TCPState::ChangeState(TCPConnection *t, TCPState *s) { t->changestate(t, s); void TCPClosed::ActiveOpen(TCPConnection *t) { // do connection operation. ChangeState(t, TCPEstablished::Instance() ); 30

31 상태패턴 - 동기 l Class diagram 31

32 상태패턴 l 의도 l 별칭 l 객체의내부상태가변경되었을때그에따라객체의행위도변경되게한다. ( 마치다른 class 의객체가된것처럼 ) l Objects for States l 적용범위 l 객체의행위가해당객체의상태에따라달라질때. l 객체의함수코드가객체의상태에따라큰부분의조건문장으로구성되어있을때 (if 문장, switch 문장 ) 32

33 상태패턴 l Structure 33

34 상태패턴 l 참여요소 l l l l 협동 l l l Context(TCPConnection) 현재상태를나타내는 ConcreteState 객체 reference 를가진다. State(TCPState) Context 객체의현재상태에따라다른행위를하는함수들의 interface 를정의한다. ConcreteState(TCPEstablished, TCPClosed, TCPListen) 각 Class 들은 Context 객체의특정상태에따라수행되는행위들을구현 Context 객체는상태의존적인요청에대해서는 ConcreteState 객체에요청을 delegation 한다. Context 객체가 ConcreteState 객체함수를호출할때자신의 reference 를인자로넘길수있다. 일반적으로 Client 가 Context 객체를초기화하는것외에는상태변환에직접적인개입을하지않는다. l Context 객체의상태변화는 Context 나 ConcreteState 객체의작업수행도중에일어난다. 34

35 상태패턴 l 결과 l It localizes state-specific behavior and partitions behavior for different state State pattern 은특정상태에연관된행위들을하나의객체로만든다. 모든상태의존코드가 State subclass 로존재하기때문에새로운상태를추가하여구현하기가용이하다. 상태조건에따라다중의 If 문장으로구성된복잡한함수를 simple 하게만든다. l It makes state transitions explicit 상태전환이일어나면참조하는객체가바뀐다. l State objects can be shared State subclass 들이개별적내부정보를가지지않는다면그객체들은공유될수있다. 즉, 하나의객체가여러 Context에서사용가능하다. 35

36 상태패턴 l 구현 l Who defines the state transitions? 상태전환에대한고정된규칙은없다. Context 나 ConcreteState 객체의특정함수내에서필요에따라 Context::ChangeState() 함수를호출하여상태전환할수있다. l A table-based alternative 상태전환표 : 각상태에서가능한입력에따라전환되는상태를기록한표 표를검색해야하므로속도가느림 사람이이해하기어려움 상태전환도중에특정한행동을수행하게만드는것이어려움 l Creating and destroying State objects 각 State 객체를필요할때생성하고, 필요없을때삭제한다. 개별내부정보가없을경우에는 Singleton pattern 을이용하여하나의객체만생성하여사용한다. 36

37 상태패턴 사례 #1 l Sample Code l Motivation 해결방안에대한프로그램코드 l Classes TCPConnection, TCPState, TCPEstablished, TCPClosed, TCPListen 37 class TCPConnection { public: TCPConnection(); void ActiveOpen(); void PassiveOpen(); void Close(); void Send(); void Transmit(TCPStream *s); void ProcessStream(TCPStream *s); private: friend class TCPState; void ChangeState(TCPState*); private: TCPState* _state; ; TCPConnection::TCPConnection () { _state = TCPClosed::Instance(); void TCPConnection::ChangeState (TCPState* s) { _state = s; void TCPConnection::ActiveOpen () { _state->activeopen(this); void TCPConnection::PassiveOpen () { _state->passiveopen(this); state 객체로요청 delegation void TCPConnection::Close () { _state->close(this); void TCPConnection::Send() { _state->send(this); void TCPConnection::Transmit(TCPStream *s) { _state->transmit(this, s);

38 상태패턴 : 사례 #1 class TCPState { public: virtual void ActiveOpen(TCPConnection*) { virtual void PassiveOpen(TCPConnection*) { virtual void Close(TCPConnection*) { virtual void Send(TCPConnection *) { virtual void Transmit(TCPConnection*, TCPStream*) { protected: void ChangeState(TCPConnection* t, TCPState* s) { t->changestate(s); ; class TCPEstablished : public TCPState { public: static TCPState* Instance(); 상태에따라서로다르게행동하는함수들 Empty body function 으로 default 함수구현 Established 상태에서만 Transmit() 함수가정보를전송 38 Established 상태에서 Close() 가호출되면대기상태 (Listen) 로변환 virtual void Transmit(TCPConnection* t, TCPStream* o) { t->processstream(o); virtual void Close(TCPConnection* t) { // send FIN, receive ACK of FIN ChangeState(t, TCPListen::Instance()); private: TCPEstablished() { ;

39 상태패턴 39 class TCPClosed : public TCPState { public: static TCPState* Instance(); void ActiveOpen (TCPConnection* t) { // send SYN, receive SYN, ACK, etc. ChangeState(t, TCPEstablished::Instance()); void PassiveOpen (TCPConnection* t) { ChangeState(t, TCPListen::Instance()); // private: TCPClosed() { //... ; Singleton pattern 사용 Close 상태에서 ActiveOpen() 호출하면 Established 상태로전환 class TCPListen : public TCPState { public: static TCPState* Instance(); void TCPListen::Send (TCPConnection* t) { // send SYN, receive SYN, ACK, etc. ChangeState(t, TCPEstablished::Instance()); // private: TCPListen() { Listen 상태에서 Send() 호출하면 // Established 상태로전환

40 상태패턴 l 적용사례 l TCP Connection Protocol (Johnson and Zweig) l HotDraw, Unidraw: drawing editor frameworks l Coplien s Envelope-Letter idiom l 관련패턴 l Singletons: State 객체를하나만생성해야될때 Singleton pattern 사용 l Flyweight: 여러종류의 State 객체들을공유해야할때 Flyweight pattern 을활용할수있다. 40

41 Pattern #18 커멘드패턴 서비스를호출할때융통성을높이려고사용 ( 예, undo 오퍼레이션 ) l 패턴요약 l 오퍼레이션을클래스로정의 41

42 커멘드패턴 - 동기 PDA s GUI System 개발프로젝트에참여한당신이맡은업무는 window main-menu 부분의설계이다. 각 application은 mainmenu를가지고있고, main-menu의각 menu 들은여러개의 menu-item 을가지고있다. 사용자가특정 menu-item 을선택하면해당 menu-item에연동된기능이수행된다. 당신은어떤식으로설계할것인가? main-menu File menu Open menu: 문서열기기능수행 42

43 커멘드패턴 - 동기 l Application s menu 모델링 지정된기능수행 파일열기기능호출 - File Open menu-item 선택 - Toolbar 에서 file open icon 선택 - Hotkey(Ctrl-O) 누르기 다양한기능요청방법을지원하기위해서는각요청을하는객체 (menuitem, toolbarbutton, hotkey) 와요청자체를분리하는것이필요 43

44 커멘드패턴 - 동기 l Application s menu 모델링 -2 l 기능요청 ( 예 : 문서열기 ) 자체를객체화 Command l 기능요청을원하는각객체에해당 Command 객체를연결예 ) File - Open menu-item, Toolbar s open icon, Ctrl-O hotkey l 기능요청을원하는각객체가선택될때연결된 Command 객체실행 command.execute(); 지정된 command 객체실행 44

45 커멘드패턴 - 동기 [Command class hierarchy] (1) PasteCommand: 현위치에 Clipboard 내용붙여넣기 ; 다른객체 (document) 에요청보내기 (2) OpenCommand: 문서열기 ; 몇개의연산조합으로기능수행. (2) (1) 45

46 커멘드패턴 - 동기 l [Command class hierarchy -2] (3) MacroCommand: 다른 Command 객체들을연속으로실행 46

47 커멘드패턴 - 동기 [Undo Mechanism: Commands undo()] - 실행된작업되돌리기 - 각 Command 객체마다자신의작업을되돌릴수있는 Undo() 함수구현 - 지금까지실행된 Command 객체들을모아두고, 이를역순으로 Undo() 호출 47

48 커멘드패턴 l 의도 l 별칭 l Encapsulate a request as an object l 기능요청을객체화함으로써, 동적으로기능설정을바꾸거나실행된기능들을기록하거나실행된작업들을재복구시킬수있다. l Action, Transaction 48

49 커멘드패턴 l 적용범위 l MenuItem 객체의경우처럼, 객체에수행되어야할행위 (action) 를동적으로설정할때 l 작업수행을요청한시점과실제작업이수행되어야할시점을다르게할필요가있을때 l Undo 기능을지원하고자할때 l System 의기능수행정도를기록하고싶을때 ; 각 Command 객체들이수행될때마다자신의기록을남김 l 기본적인행위들을조합하여더욱복잡한행위를실행하고자할때 ; MacroCommand 사용 49

50 커멘드패턴 l Structure 50

51 커멘드패턴 l Participants l Command ; 연산수행에대한 Interface 정의 - Execute() l ConcreteCommand (OpenCommand, PasteCommand, ) ; 연산수행을위한 Execute() 함수구현 ; Execute() 함수는적절한 Receiver 의함수 ( 들 ) 을호출해서기능수행 l Client (Application) ; ConcreteCommand 객체를생성하고, 해당객체에 Receiver 객체를설정한다. l Invoker (MenuItem) ; Command 객체에게기능수행을요청한다. l Receiver (Document, Application) ; ConcreteCommand 객체들이연산을수행하는데필요한기능들을제공한다. 51

52 커멘드패턴 l l Collaboration Steps 1. Client 가 ConcreteCommand 객체를생성하고, 해당객체에 Receiver 객체를설정한다. 2. Invoker 객체는적합한 ConcreteCommand 객체의 reference 를가진다. 3. Invoker 객체는자신이가지고있는 ConcreteCommand 객체의 reference 를통하여기능을요청한다. - command->execute() 4. 요청을받은 ConcreteCommand 객체는 Step1. 에서설정된 Receiver 객체의함수를이용하여요청을실행한다. 52

53 커멘드패턴

54 커멘드패턴 l 결과 l 작업수행을요청하는객체와실제작업을수행하는객체를분리시킨다. l 작업요청자체가객체가되기때문에, 다른객체처럼 작업요청 자체를저장하고, 복구하고, 확장할수있다. l 기본적인행위들을조합하여더욱복잡한행위를실행하고자할때 l 기존코드의변경없이새로운 Command 를추가할수있다. 54

55 커멘드패턴 l 구현 l How intelligent should a command be? Command 는 단순히받은 request 를 Receiver 객체에게전달만하는것 에서부터 주된 Receiver 객체도움없이자신이모든것을구현하는것 까지그범위가다양하다. l Supporting undo and redo? Command 로실행된작업들을복구하려면어떻게? 실행된 Command 객체들을저장한 History List 필요 Motivation -6. Slide 참조. l Using C++ template Execute() 함수에인자가필요없고, undo 기능이필요없다면, ConcreteCommand class 를쉽게만들기위하여 C++ template을이용할수있다. 55

56 커멘드패턴 사례 #1 C++ template 코드예 Receiver class 를인자로 template <class Receiver> class SimpleCommand : public Command { public: typedef void (Receiver::* Action)(); SimpleCommand(Receiver* r, Action a) : _receiver(r), _action(a) { 56 virtual void Execute() { (_receiver->*_action)(); private: Action _action; Receiver* _receiver; ; class MyClass { public: void Action(); ; Command 객체에 Receiver 객체와함수지정 // Client Code MyClass* receiver = new MyClass; //... Command* acommand = new SimpleCommand<MyClass>(receiver, &MyClass::Action); //... acommand->execute();

57 커멘드패턴 사례 #1 l Sample Code l Motivation -4, -5. Slide 에나오는 Class diagram 구현 57 class Document { public: Document(const char*); void Open(); void Paste(); ; class Application { public: Application(); void Add(Document*); ; class Command { public: virtual ~Command(); virtual void Execute() = 0; protected: Command(); ; class OpenCommand : public Command { public: OpenCommand(Application* a) { _application = a; virtual void Execute() { const char* name = AskUser(); Receiver 객체인 application 지정 if (name!= 0) { Document* document = new Document(name); _application->add(document); document->open(); protected: virtual const char* AskUser(); private: Application* _application; char* _response; ; application 과 document 객체를이용하여요청구현

58 커멘드패턴 사례 #1 58 class PasteCommand : public Command { public: PasteCommand(Document* doc) { _document = doc; virtual void Execute() { _document->paste(); private: Document* _document; ; Iterator 을이용하여저장되어있는 Command 객체들의 Execute() 호출 List template 을이용하여 Command 객체들을저장 class MacroCommand : public Command { public: MacroCommand(); virtual ~MacroCommand(); virtual void Add(Command* c) { _cmds->append(c); virtual void Remove(Command* c) { _cmds->remove(c); virtual void Execute() { ListIterator<Command*> i(_cmds); for (i.first();!i.isdone(); i.next()) { Command* c = i.currentitem(); c->execute(); private: List<Command*>* _cmds; ; 수행될 Command 객체들추가및삭제

59 커멘드패턴 사례 #1 l 사용사례 l MacApp system, THINK class library : Undoable operation l ET++, InterViews, Unidraw system l 관련패턴 l MacroCommand 를구현하는데 Composite pattern 을사용할수있다. l Undo 기능을위해서보관해야될관련객체들의상태정보를표현하기위하여 Memento pattern 을적용할수있다. l Undo 기능을위하여 Command 객체가 History list에복사될때 Prototype pattern 을적용할수있다. 59

쉽게 풀어쓴 C 프로그래밍

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

More information

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures 단일연결리스트 (Singly Linked List) 신찬수 연결리스트 (linked list)? tail 서울부산수원용인 null item next 구조체복습 struct name_card { char name[20]; int date; } struct name_card a; // 구조체변수 a 선언 a.name 또는 a.date // 구조체 a의멤버접근 struct

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

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

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

JAVA PROGRAMMING 실습 05. 객체의 활용

JAVA PROGRAMMING 실습 05. 객체의 활용 public class Person{ public String name; public int age; } public Person(){ } public Person(String s, int a){ name = s; age = a; } public String getname(){ return name; } @ 객체의선언 public static void main(string

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

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

DocsPin_Korean.pages

DocsPin_Korean.pages Unity Localize Script Service, Page 1 Unity Localize Script Service Introduction Application Game. Unity. Google Drive Unity.. Application Game. -? ( ) -? -?.. 준비사항 Google Drive. Google Drive.,.. - Google

More information

설계란 무엇인가?

설계란 무엇인가? 금오공과대학교 C++ 프로그래밍 jhhwang@kumoh.ac.kr 컴퓨터공학과 황준하 9 강. 클래스의활용목차 멤버함수의외부정의 this 포인터 friend 선언 static 멤버 임시객체 1 /17 9 강. 클래스의활용멤버함수의외부정의 멤버함수정의구현방법 내부정의 : 클래스선언내에함수정의구현 외부정의 클래스선언 : 함수프로토타입 멤버함수정의 : 클래스선언외부에구현

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Verilog: Finite State Machines CSED311 Lab03 Joonsung Kim, joonsung90@postech.ac.kr Finite State Machines Digital system design 시간에배운것과같습니다. Moore / Mealy machines Verilog 를이용해서어떻게구현할까? 2 Finite State

More information

Microsoft Word - FunctionCall

Microsoft Word - FunctionCall Function all Mechanism /* Simple Program */ #define get_int() IN KEYOARD #define put_int(val) LD A val \ OUT MONITOR int add_two(int a, int b) { int tmp; tmp = a+b; return tmp; } local auto variable stack

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

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

금오공대 컴퓨터공학전공 강의자료

금오공대 컴퓨터공학전공 강의자료 C 프로그래밍프로젝트 Chap 14. 포인터와함수에대한이해 2013.10.09. 오병우 컴퓨터공학과 14-1 함수의인자로배열전달 기본적인인자의전달방식 값의복사에의한전달 val 10 a 10 11 Department of Computer Engineering 2 14-1 함수의인자로배열전달 배열의함수인자전달방식 배열이름 ( 배열주소, 포인터 ) 에의한전달 #include

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

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

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

<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

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

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

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

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

Microsoft PowerPoint - C++ 5 .pptx

Microsoft PowerPoint - C++ 5 .pptx C++ 언어프로그래밍 한밭대학교전자. 제어공학과이승호교수 연산자중복 (operator overloading) 이란? 2 1. 연산자중복이란? 1) 기존에미리정의되어있는연산자 (+, -, /, * 등 ) 들을프로그래머의의도에맞도록새롭게정의하여사용할수있도록지원하는기능 2) 연산자를특정한기능을수행하도록재정의하여사용하면여러가지이점을가질수있음 3) 하나의기능이프로그래머의의도에따라바뀌어동작하는다형성

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 - chap06-2pointer.ppt

Microsoft PowerPoint - chap06-2pointer.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-2 참고자료 포인터 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 포인터의정의와사용 변수를선언하는것은메모리에기억공간을할당하는것이며할당된이후에는변수명으로그기억공간을사용한다. 할당된기억공간을사용하는방법에는변수명외에메모리의실제주소값을사용하는것이다.

More information

thesis

thesis ( Design and Implementation of a Generalized Management Information Repository Service for Network and System Management ) ssp@nile nile.postech.ac..ac.kr DPE Lab. 1997 12 16 GMIRS GMIRS GMIRS prototype

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

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

Network seminar.key

Network seminar.key Intro to Network .. 2 4 ( ) ( ). ?!? ~! This is ~ ( ) /,,,???? TCP/IP Application Layer Transfer Layer Internet Layer Data Link Layer Physical Layer OSI 7 TCP/IP Application Layer Transfer Layer 3 4 Network

More information

1. 객체의생성과대입 int 형변수 : 선언과동시에초기화하는방법 (C++) int a = 3; int a(3); // 기본타입역시클래스와같이처리가능 객체의생성 ( 복습 ) class CPoint private : int x, y; public : CPoint(int a

1. 객체의생성과대입 int 형변수 : 선언과동시에초기화하는방법 (C++) int a = 3; int a(3); // 기본타입역시클래스와같이처리가능 객체의생성 ( 복습 ) class CPoint private : int x, y; public : CPoint(int a 6 장복사생성자 객체의생성과대입객체의값에의한전달복사생성자디폴트복사생성자복사생성자의재정의객체의값에의한반환임시객체 C++ 프로그래밍입문 1. 객체의생성과대입 int 형변수 : 선언과동시에초기화하는방법 (C++) int a = 3; int a(3); // 기본타입역시클래스와같이처리가능 객체의생성 ( 복습 ) class CPoint private : int x, y;

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

1. auto_ptr 다음프로그램의문제점은무엇인가? void func(void) int *p = new int; cout << " 양수입력 : "; cin >> *p; if (*p <= 0) cout << " 양수를입력해야합니다 " << endl; return; 동적할

1. auto_ptr 다음프로그램의문제점은무엇인가? void func(void) int *p = new int; cout <<  양수입력 : ; cin >> *p; if (*p <= 0) cout <<  양수를입력해야합니다  << endl; return; 동적할 15 장기타주제들 auto_ptr 변환함수 cast 연산자에의한명시적형변환실행시간타입정보알아내기 (RTTI) C++ 프로그래밍입문 1. auto_ptr 다음프로그램의문제점은무엇인가? void func(void) int *p = new int; cout > *p; if (*p

More information

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp");

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher( 실행할페이지.jsp); 다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp"); dispatcher.forward(request, response); - 위의예에서와같이 RequestDispatcher

More information

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Function) 1. 함수의개념 입력에대해적절한출력을발생시켜주는것 내가 ( 프로그래머 ) 작성한명령문을연산, 처리, 실행해주는부분 ( 모듈 ) 자체적으로실행되지않으며,

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

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 3 장함수와문자열 1. 함수의기본적인개념을이해한다. 2. 인수와매개변수의개념을이해한다. 3. 함수의인수전달방법 2가지를이해한다 4. 중복함수를이해한다. 5. 디폴트매개변수를이해한다. 6. 문자열의구성을이해한다. 7. string 클래스의사용법을익힌다. 이번장에서만들어볼프로그램 함수란? 함수선언 함수호출 예제 #include using

More information

17장 클래스와 메소드

17장 클래스와 메소드 17 장클래스와메소드 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 1 / 18 학습내용 객체지향특징들객체출력 init 메소드 str 메소드연산자재정의타입기반의버전다형성 (polymorphism) 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 2 / 18 객체지향특징들 객체지향프로그래밍의특징 프로그램은객체와함수정의로구성되며대부분의계산은객체에대한연산으로표현됨객체의정의는

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

More information

제목

제목 Object-Oriented Design Agile for Software Development Story 7. 작 성 자 : 고형호 메 일 : hyungho.ko@gmail.com 홈페이지 : 최초작성일 : 2007.08.10 최종작성일 : 2007.09.05 1 Goal A Set of Contained Responsibilities 2 Content 1.

More information

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 8 장클래스와객체 I 이번장에서학습할내용 클래스와객체 객체의일생직접 메소드클래스를 필드작성해 UML 봅시다. QUIZ 1. 객체는 속성과 동작을가지고있다. 2. 자동차가객체라면클래스는 설계도이다. 먼저앞장에서학습한클래스와객체의개념을복습해봅시다. 클래스의구성 클래스 (class) 는객체의설계도라할수있다. 클래스는필드와메소드로이루어진다.

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

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

More information

슬라이드 1

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

More information

API 매뉴얼

API 매뉴얼 PCI-DIO12 API Programming (Rev 1.0) Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information

Microsoft PowerPoint - Chapter 6.ppt

Microsoft PowerPoint - Chapter 6.ppt 6.Static 멤버와 const 멤버 클래스와 const 클래스와 static 연결리스트프로그램예 Jong Hyuk Park 클래스와 const Jong Hyuk Park C 의 const (1) const double PI=3.14; PI=3.1415; // 컴파일오류 const int val; val=20; // 컴파일오류 3 C 의 const (1)

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

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 7 장클래스와객체 이번장에서학습할내용 객체지향이란? 객체 메시지 클래스 객체지향의장점 String 클래스 객체지향개념을완벽하게이해해야만객체지향설계의이점을활용할수있다. 실제세계는객체로이루어진다. 객체지향이란? 실제세계를모델링하여소프트웨어를개발하는방법 절차지향과객체지향 절차지향프로그래밍 (procedural programming): 문제를해결하는절차를중요하게생각하는방법

More information

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation 1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation Board(EVB B/D) 들과 TCP/IP Protocol로연결되며, 연결된 TCP/IP

More information

Lab 3. 실습문제 (Single linked list)_해답.hwp

Lab 3. 실습문제 (Single linked list)_해답.hwp Lab 3. Singly-linked list 의구현 실험실습일시 : 2009. 3. 30. 담당교수 : 정진우 담당조교 : 곽문상 보고서제출기한 : 2009. 4. 5. 학과 : 학번 : 성명 : 실습과제목적 : 이론시간에배운 Singly-linked list를실제로구현할수있다. 실습과제내용 : 주어진소스를이용해 Singly-linked list의각함수를구현한다.

More information

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 (   ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각 JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( http://java.sun.com/javase/6/docs/api ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각선의길이를계산하는메소드들을작성하라. 직사각형의가로와세로의길이는주어진다. 대각선의길이는 Math클래스의적절한메소드를이용하여구하라.

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

More information

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일 Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 Introduce Me!!! Job Jeju National University Student Ubuntu Korean Jeju Community Owner E-Mail: ned3y2k@hanmail.net Blog: http://ned3y2k.wo.tc Facebook: http://www.facebook.com/gyeongdae

More information

슬라이드 1

슬라이드 1 마이크로컨트롤러 2 (MicroController2) 2 강 ATmega128 의 external interrupt 이귀형교수님 학습목표 interrupt 란무엇인가? 기본개념을알아본다. interrupt 중에서가장사용하기쉬운 external interrupt 의사용방법을학습한다. 1. Interrupt 는왜필요할까? 함수동작을추가하여실행시키려면? //***

More information

Microsoft PowerPoint 장강의노트.ppt

Microsoft PowerPoint 장강의노트.ppt 클래스와객체 클래스와객체 객체 : 우리주변의어떤대상의모델 - 예 : 사람, 차, TV, 개 객체 = 상태 (state) + 행동 (behavior) - 예 : 개의상태 - 종자, 이름, 색개의행동 - 짖다, 가져오다 상태는변수로행동은메소드로나타냄 객체는클래스에의해정의된다. 클래스는객체가생성되는틀혹은청사진이다. 2 예 : 클래스와객체 질문 : 클래스와객체의다른예는?

More information

1. 클래스와배열 int 형배열선언및초기화 int ary[5] = 1, 2, 3, 4, 5 ; for (int i = 0; i < 5; i++) cout << "ary[" << i << "] = " << ary[i] << endl; 5 장클래스의활용 1

1. 클래스와배열 int 형배열선언및초기화 int ary[5] = 1, 2, 3, 4, 5 ; for (int i = 0; i < 5; i++) cout << ary[ << i << ] =  << ary[i] << endl; 5 장클래스의활용 1 5 장클래스의활용 클래스와배열객체포인터 this 포인터멤버함수오버로딩디폴트매개변수의사용 friend ( 전역함수, 클래스, 멤버함수 ) 내포클래스지역클래스 static 멤버 const 멤버와 const 객체 explicit 생성자 C++ 프로그래밍입문 1. 클래스와배열 int 형배열선언및초기화 int ary[5] = 1, 2, 3, 4, 5 ; for (int

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

설계란 무엇인가?

설계란 무엇인가? 금오공과대학교 C++ 프로그래밍 jhhwang@kumoh.ac.kr 컴퓨터공학과 황준하 6 강. 함수와배열, 포인터, 참조목차 함수와포인터 주소값의매개변수전달 주소의반환 함수와배열 배열의매개변수전달 함수와참조 참조에의한매개변수전달 참조의반환 프로그래밍연습 1 /15 6 강. 함수와배열, 포인터, 참조함수와포인터 C++ 매개변수전달방법 값에의한전달 : 변수값,

More information

chapter4

chapter4 Basic Netw rk 1. ก ก ก 2. 3. ก ก 4. ก 2 1. 2. 3. 4. ก 5. ก 6. ก ก 7. ก 3 ก ก ก ก (Mainframe) ก ก ก ก (Terminal) ก ก ก ก ก ก ก ก 4 ก (Dumb Terminal) ก ก ก ก Mainframe ก CPU ก ก ก ก 5 ก ก ก ก ก ก ก ก ก ก

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information

Chapter 4. LISTS

Chapter 4. LISTS C 언어에서리스트구현 리스트의생성 struct node { int data; struct node *link; ; struct node *ptr = NULL; ptr = (struct node *) malloc(sizeof(struct node)); Self-referential structure NULL: defined in stdio.h(k&r C) or

More information

슬라이드 1

슬라이드 1 정적메모리할당 (Static memory allocation) 일반적으로프로그램의실행에필요한메모리 ( 변수, 배열, 객체등 ) 는컴파일과정에서결정되고, 실행파일이메모리에로드될때할당되며, 종료후에반환됨 동적메모리할당 (Dynamic memory allocation) 프로그램의실행중에필요한메모리를할당받아사용하고, 사용이끝나면반환함 - 메모리를프로그램이직접관리해야함

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

Microsoft PowerPoint - es-arduino-lecture-03

Microsoft PowerPoint - es-arduino-lecture-03 임베디드시스템개론 : Arduino 활용 Lecture #3: Button Input & FND Control 2012. 3. 25 by 김영주 강의목차 디지털입력 Button switch 입력 Button Debounce 7-Segment FND : 직접제어 7-Segment FND : IC 제어 2 디지털입력 : Switch 입력 (1) 실습목표 아두이노디지털입력처리실습

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 - additional01.ppt [호환 모드]

Microsoft PowerPoint - additional01.ppt [호환 모드] 1.C 기반의 C++ part 1 함수 오버로딩 (overloading) 디폴트매개변수 (default parameter) 인-라인함수 (in-line function) 이름공간 (namespace) Jong Hyuk Park 함수 Jong Hyuk Park 함수오버로딩 (overloading) 함수오버로딩 (function overloading) C++ 언어에서는같은이름을가진여러개의함수를정의가능

More information

JUNIT 실습및발표

JUNIT 실습및발표 JUNIT 실습및발표 JUNIT 접속 www.junit.org DownLoad JUnit JavaDoc API Document 를참조 JUNIT 4.8.1 다운로드 설치파일 (jar 파일 ) 을다운로드 CLASSPATH 를설정 환경변수에서설정 실행할클래스에서 import JUnit 설치하기 테스트실행주석 @Test Test 를실행할 method 앞에붙임 expected

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

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer Domino, Portal & Workplace WPLC FTSS Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer ? Lotus Notes Clients

More information

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 2012.11.23 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Document Distribution Copy Number Name(Role, Title) Date

More information

Chapter 4. LISTS

Chapter 4. LISTS 연결리스트의응용 류관희 충북대학교 1 체인연산 체인을역순으로만드는 (inverting) 연산 3 개의포인터를적절히이용하여제자리 (in place) 에서문제를해결 typedef struct listnode *listpointer; typedef struct listnode { char data; listpointer link; ; 2 체인연산 체인을역순으로만드는

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_DesignPatterns\(2008\).ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - 11_DesignPatterns\(2008\).ppt [\310\243\310\257 \270\360\265\345]) LECTURE 11 디자인패턴 설계작업에대한도전 소프트웨어설계는어려운일 문제를잘분할하고 유연하고잘모듈화된우아한디자인이되어야함 설계는시행착오 (trial and error) 의결과 성공적인설계가존재 두설계가똑같은일은없음 반복되는특성 2 디자인패턴 디자인패턴은공통된소프트웨어문제에오래동안사용되어검증된솔루션 디자인작업에사용되는공통언어. 의사소통을향상시키며구현, 문서화에도움

More information

SK IoT IoT SK IoT onem2m OIC IoT onem2m LG IoT SK IoT KAIST NCSoft Yo Studio tidev kr 5 SK IoT DMB SK IoT A M LG SDS 6 OS API 7 ios API API BaaS Backend as a Service IoT IoT ThingPlug SK IoT SK M2M M2M

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

어댑터뷰

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

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

API - Notification 메크로를통하여어느특정상황이되었을때 SolidWorks 및보낸경로를통하여알림메시지를보낼수있습니다. 이번기술자료에서는메크로에서이벤트처리기를통하여진행할예정이며, 메크로에서작업을수행하는데유용할것입니다. 알림이벤트핸들러는응용프로그램구현하는데있어

API - Notification 메크로를통하여어느특정상황이되었을때 SolidWorks 및보낸경로를통하여알림메시지를보낼수있습니다. 이번기술자료에서는메크로에서이벤트처리기를통하여진행할예정이며, 메크로에서작업을수행하는데유용할것입니다. 알림이벤트핸들러는응용프로그램구현하는데있어 메크로를통하여어느특정상황이되었을때 SolidWorks 및보낸경로를통하여알림메시지를보낼수있습니다. 이번기술자료에서는메크로에서이벤트처리기를통하여진행할예정이며, 메크로에서작업을수행하는데유용할것입니다. 알림이벤트핸들러는응용프로그램구현하는데있어서가장중요한부분이라고도할수있기때문입니다. 1. 새로운메크로생성 새메크로만들기버튺을클릭하여파일을생성합니다. 2. 메크로저장 -

More information

MAX+plus II Getting Started - 무작정따라하기

MAX+plus II Getting Started - 무작정따라하기 무작정 따라하기 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,

More information

PowerPoint Template

PowerPoint Template JavaScript 회원정보 입력양식만들기 HTML & JavaScript Contents 1. Form 객체 2. 일반적인입력양식 3. 선택입력양식 4. 회원정보입력양식만들기 2 Form 객체 Form 객체 입력양식의틀이되는 태그에접근할수있도록지원 Document 객체의하위에위치 속성들은모두 태그의속성들의정보에관련된것

More information

- 목차 - - ios 개발환경및유의사항. - 플랫폼 ios Project. - Native Controller와플랫폼화면연동. - 플랫폼 Web(js)-Native 간데이터공유. - 플랫폼확장 WN Interface 함수개발. - Network Manager clas

- 목차 - - ios 개발환경및유의사항. - 플랫폼 ios Project. - Native Controller와플랫폼화면연동. - 플랫폼 Web(js)-Native 간데이터공유. - 플랫폼확장 WN Interface 함수개발. - Network Manager clas 플랫폼사용을위한 ios Native Guide - 목차 - - ios 개발환경및유의사항. - 플랫폼 ios Project. - Native Controller와플랫폼화면연동. - 플랫폼 Web(js)-Native 간데이터공유. - 플랫폼확장 WN Interface 함수개발. - Network Manager class 개발. - Native Controller에서

More information

API 매뉴얼

API 매뉴얼 PCI-TC03 API Programming (Rev 1.0) Windows, Windows2000, Windows NT, Windows XP and Windows 7 are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations

More information

Lab 4. 실습문제 (Circular singly linked list)_해답.hwp

Lab 4. 실습문제 (Circular singly linked list)_해답.hwp Lab 4. Circular singly-linked list 의구현 실험실습일시 : 2009. 4. 6. 담당교수 : 정진우 담당조교 : 곽문상 보고서제출기한 : 2009. 4. 12. 학과 : 학번 : 성명 : 실습과제목적 : 이론시간에배운 Circular Singly-linked list를실제로구현할수있다. 실습과제내용 : 주어진소스를이용해 Circular

More information

C++ Programming

C++ Programming C++ Programming 클래스와데이터추상화 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 객체지향프로그래밍 클래스와객체 2 객체지향프로그래밍 객체지향언어 (Object-Oriented Language) 프로그램을명령어의목록으로보는시각에서벗어나여러개의 독립된단위, 즉 객체 (Object) 들의모임으로파악

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

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

final_thesis

final_thesis CORBA/SNMP DPNM Lab. POSTECH email : ymkang@postech.ac.kr Motivation CORBA/SNMP CORBA/SNMP 2 Motivation CMIP, SNMP and CORBA high cost, low efficiency, complexity 3 Goal (Information Model) (Operation)

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

C++ Programming

C++ Programming C++ Programming 예외처리 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 예외처리 2 예외처리 예외처리 C++ 의예외처리 예외클래스와객체 3 예외처리 예외를처리하지않는프로그램 int main() int a, b; cout > a >> b; cout

More information

DIY 챗봇 - LangCon

DIY 챗봇 - LangCon without Chatbot Builder & Deep Learning bage79@gmail.com Chatbot Builder (=Dialogue Manager),. We need different chatbot builders for various chatbot services. Chatbot builders can t call some external

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

DataBinding

DataBinding DataBinding lifeisforu@naver.com 최도경 이문서는 MSDN 의내용에대한요약을중심으로작성되었습니다. Data Binding Overview. Markup Extensions and WPF XAML. What Is Data Binding UI 와 business logic 사이의연결을설정하는 process 이다. Binding 이올바르게설정되면

More information

<4D F736F F F696E74202D2036C0CFC2B05FB0B4C3BCC1F6C7E2C7C1B7CEB1D7B7A1B9D62E707074>

<4D F736F F F696E74202D2036C0CFC2B05FB0B4C3BCC1F6C7E2C7C1B7CEB1D7B7A1B9D62E707074> 객체지향프로그램밍 (Object-Oriented Programming) 1 C++ popular C 객체지향 (object oriented) C++ C : 상위계층언어특징 + 어셈블리언어특징 C++ : 소프트웨어개발플랫폼에객체지향개념제공 객체지향 : 자료와이들자료를어떻게다룰것인지따로생각하지않고단지하나의사물로생각 형 변수가사용하는메모리크기 변수가가질수있는정보

More information

vm-웨어-앞부속

vm-웨어-앞부속 VMware vsphere 4 This document was created using the official VMware icon and diagram library. Copyright 2009 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright

More information