[[TableOfContents]] = OOP = '''Object Oriented Programming''' : ê°ì²´ 지향 프로그래ë°. ~~ê°ì²´ë¥¼ 지향하는 프로그래ë°ìž…니다.~~ì´ ì´ì „ì— Object Based Progamming ê²ƒì´ ìžˆì—ˆë‹¤.ì´ ë‹¤ìŒ ì„¸ëŒ€ì˜ í”„ë¡œê·¸ëž˜ë° ê¸°ë²•ì€ GenericProgrammingì´ë¼ê³ ì´ì•¼ê¸°ëœë‹¤. == OOP... == === Definition === Object-oriented programming is based in the principle of recursive design. 1. Everything is an object. 2. Objects perform computation by making requests of each other through the passing of messages. 3. Every object has it's own memory, which consists of other objects. 4. Every object is an instance of a class. A class groups similar objects. 5. The class is the repository for behabior associated with an object. 6. Classes are organized into singly-rooted tree structure, called an inheritance hirearchy. === Basic Idea === â€Emphasis from verbs to nouns†It’s a natural way for people to â€think in objectsâ€. Program consists of objects interacting with eachother Objects provide services. === ì´ìµ === Clearer and easier to read Easier to maintain Code is more easily reusable == 용어 == * [Class] * [Object] * [Instance] * [Association](ì—°ê´€) * [Relation](관계) * [Inheritance](ìƒì†) * [Method] * [protocol] * [Encapsulation](캡ìŠí™”) * [Interface] * [Implementation](구현 : ì¸ê°„ì˜ ê°œë… ì†ì— 존재하는 ìƒê°ê³¼ ì‚¬ìƒ ë“±ì„ ì‹¤ì œ 물리ì ì¸ ê°ì²´ë¡œ 구성하는 ì¼ë ¨ì˜ 작업. 예를 들어 새로운 êµ¬ì¡°ì˜ ì»´í“¨í„° ì‹œìŠ¤í…œì„ ë§Œë“¤ì–´ 내는 작업과 설계 ê³¼ì •ì„ ê±°ì³ì„œ ì „ë‹¬ëœ ë‚´ìš©ì„ ì‹¤ì œ 프로그램으로 구성하여 컴퓨터ì—서 ì‚¬ìš©í• ìˆ˜ 있ë„ë¡ í•˜ëŠ” 작업 ë“±ì´ ëª¨ë‘ êµ¬í˜„ ìž‘ì—…ì˜ í•œ ê°€ì§€ì— í•´ë‹¹ëœë‹¤ê³ í• ìˆ˜ 있다. : ì •ë³´ë¬¸í™”ì‚¬ 컴퓨터 ìš©ì–´ì‚¬ì „ 발췌) * [Attribute] * [Class variable] * [Data member] * [Member function] * [Operation] * [Private and public members] * [Polymorfism] * [Virtual functions] * [Templates] * [Generic programming] === Basic rules to define objects === Objects should correspond real word objects Responsibily area should be simple and compact All actions should be delegated to objects Don’t mix responsibilities Keep responsibily areas as general as possible to garantie reuse. == 엮어가기 == [UML]로 í‘œê¸°í• ìˆ˜ 있다. [ê°ì²´ì§€í–¥ìš©ì–´í•œê¸€í™”í† ë¡ ] == ë°”ê¹¥ê³ ë¦¬ == === ë„움ë˜ëŠ” 페ì´ì§€ === [http://users.evitech.fi/~hannuvl/sy04/oop_cp.htm] : C++ OOPê°•ì˜. [http://www.codeproject.com/cpp/oopuml.asp UML&OOP] ---- [프로그래ë°ë¶„류]