내 ¶
2004 바 3번 문
딩 ¶
미 는 를 , 는 를 (Overriding) . 미 는 를 면, 는 무, 동 .
를 들 People move(int aX, int aY){this.position.x += aX;this.position.y += aY;}는 . 리 People를 받 Student는 . 데 '' 멍 대 . 면 받 move를 . move(int aX, int aY){this.position.x -= aX;this.position.y -= aY;}
를 들 People move(int aX, int aY){this.position.x += aX;this.position.y += aY;}는 . 리 People를 받 Student는 . 데 '' 멍 대 . 면 받 move를 . move(int aX, int aY){this.position.x -= aX;this.position.y -= aY;}
~cpp People people;// (100, 100) people.move(10,10);//동 (110, 110) Student student;// (100, 100) student.move(10,10);//동 (90, 90)를 는 만들 는 명 매변 . 만, 를 만들는데 는 매변 르면, 딩 .
딩 ¶
딩란 명 능 면 받는 매변 른 를 는 말.
말 People move를 를 들보. move는 를 매변 받들. 만 people.move(1.1, 2.13)는 명를 면 매변 르는 러 . 더블 를 받들 move를 Overloading. move(double aX, double aY){this.position.x += (int)aX;this.position.y += (int)aY;} . 떤 는 매변 . 딩 들 매변 .
말 People move를 를 들보. move는 를 매변 받들. 만 people.move(1.1, 2.13)는 명를 면 매변 르는 러 . 더블 를 받들 move를 Overloading. move(double aX, double aY){this.position.x += (int)aX;this.position.y += (int)aY;} . 떤 는 매변 . 딩 들 매변 .
~cpp People people;// (100, 100) people.move(10,10);//동 (110, 110) people.move(5.1,11.8);//Overloading , 동 (115, 121)
미 ¶
Overriding Overloading 문 동 . Overloading '무 많 ', ''는 , Overriding '무', '밟' . 미를 면 동 .