오버로딩(Overloading) ë°� ë¦¬íŒ©í† ë§� ¶
- 오버로딩 - C++ì—�서 cinì�„ cin.get(), cin.get(ch), cin.get(ch,50) ì�´ë ‡ê²Œ 쓰는 것처럼 ê°™ì�€ ì�´ë¦„ì�˜ 함수로 비슷한 기능ì�˜ ì—í• ì�„ 하는 함수들ì�„ 만들었다.
~cpp
public Circle(int xValue, int yValue, int width, int height) {
middlePoint = new Point(xValue, yValue);
this.width = width;
this.height = height;
}
public Circle(int xValue, int yValue, int r){
middlePoint = new Point(xValue, yValue);
this.width = r;
this.height = r;
}
- ë˜� Point(int xValue, int yValue) -> ê°™ì�´ ì „ë‹¬ì�¸ìž�를 바로 넣어주어서 보다 간편하게 ìž�료를 ìž…ë ¥ë°›ì�„ 수 있게 했다.
| 창재 & 수민 Pair | |










