�N���X�p�����������B
class Point {
public x, y ;
method New (x0, y0) { x = x0 ; y = y0 }
method Set (x0, y0) { x = x0 ; y = y0 }
method Move(dx, dy) { x += dx ; y += dy }
}
class MovingPoint : Point {
public vx, vy ;
method SetVelocity (dx, dy) { vx = dx; vy = dy } ;
method MoveOneStep () { x += dx ; y += dy }
}
��������AMovingPoint�N���X��APoint�N���X�������`������ ��B�����������A
class MovingPoint : Point { ....
�������B���������AMovingPoint�N���X��APoint�N���X����� ��������������B
MovingPoint�N���X��APoint�N���X������o����A���\�b�h������� �p��A�����MovingPoint�N���X�����������o�A���\�b�h���`��� �����B
�����APoint�N���X��AMovingPoint�N���X��X�[�p�[�N���X�AMovingPoint �N���X��Point�N���X��T�u�N���X������B
MovingPoint�N���X��MoveOneStep���\�b�h��Q������x, y��APoint�N ���X���`��������o���B
�L��N���X��`�������A
var aMovingPoint = new MovingPoint ;
aMovingPoint->Set(10, 10) ;
�����\�b�h���o��R�[�h�����APoint�N���X��Set���\�b�h����o�� ��A�������APoint�N���X���`��������o x, y ��f�[�^��Z�b�g �����B
���A��L�������APoint�N���X���`����public�����o x, y ��l�������������B
aMovingPoint->x = 10 ;
aMovingPoint->y = 20 ;
�T�u�N���X����\�b�h/��`����A�X�[�p�[�N���X��������o�A�N�Z�X�� ����B����A�T�u�N���X�����A�X�[�p�[�N���X��public, private,static,method,hiden��������p����� ������12.1�B