ĸ½¶È (Encapsulation)
ĸ½¶È (Encapsulation)
- °´Ã¼´Â µ¥ÀÌÅÍ¿Í ¿ÀÆÛ·¹À̼ÇÀ» ÇÔ²² ¹´Â´Ù.
- ĸ½¶È°¡ Áß¿äÇÑ ÀÌÀ¯ ?
- Certain knowledge and certain operations are conceptually related to each other.
- Hence, it makes sense to bundle them together.
- Such "bundling" is referred to as encapsulation.
- It functions as an aid to conceptualization and abstraction.
- Point
- class point {
int xPosition;
int yPosition;
boolean Status;
public:
void move (int, int);
void penUp ( );
void pendown ( );
}
Notes: