diff --git a/src/main/java/cn/zust/edu/cn/Point.java b/src/main/java/cn/zust/edu/cn/Point.java index 5661ad0dc525c7f45779a6b9a2d09b9be0a440b6..c04244a168f844807d3f3f4dec29a51ef633284d 100644 --- a/src/main/java/cn/zust/edu/cn/Point.java +++ b/src/main/java/cn/zust/edu/cn/Point.java @@ -5,5 +5,42 @@ package cn.zust.edu.cn; * @since 2023/3/7 10:50 */ public class Point { + private int x; + private int y; + + public Point() { + this.x = 0; + this.y = 0; + } + public Point(int x, int y) { + this.x = x; + this.y = y; + } + + public Point(Point p) { + this.x = p.x; + this.y = p.y; + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + @Override + public String toString() { + return "(" + x + ", " + y + ")"; + } }