E D R , A S I H C RSS

OOP

1. OOP

Object Oriented Programming : ฐฒด €ํ–ฅ ํ”„กœทธž˜ฐ. ฐฒด €ํ–ฅํ•˜Š” ํ”„กœทธž˜ฐž…‹ˆ‹ค.ด ด „— Object Based Progamming ฒƒด žˆ—ˆ‹ค.ด ‹คŒ „Œ€˜ ํ”„กœทธž˜ฐ ธฐฒ•€ GenericProgrammingดณ  ด•ธฐœ‹ค.

1.1. OOP...

1.1.1. 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.

1.1.2. 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.

1.1.3. ดต

Clearer and easier to read
Easier to maintain
Code is more easily reusable

1.2. šฉ–ด

  • 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

1.2.1. 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.

1.3. —ฎ–ด€ธฐ

1.4. ฐ”ณ ฆฌ

1.4.1. „›€˜Š” ํŽ˜ด€

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:52
Processing time 0.0584 sec