-->
当前位置:首页 > 题库

PROGRAMMING:Definition and use of class

Luz5年前 (2021-05-10)题库416
Please define a point class, which has two data members: X and y, representing X and Y coordinates respectively, and has several constructors and a moving member function to output new coordinate values after moving.
###Input:
The two numbers in the first row represent the X and Y coordinates of the point, respectively. The two numbers in the second row represent the distance moved in the X and Y directions, respectively.
###Output:
The X and Y coordinates of the moving point.
###Input example:
```in
1 5
2 5
```
###Output example:
```out
3 10
```






answer:If there is no answer, please comment