From fe9dc5cef07c5784eacce4f9e2d0639870e6af30 Mon Sep 17 00:00:00 2001 From: Lves <16744448+tong-zhehui@user.noreply.gitee.com> Date: Tue, 10 Mar 2026 10:46:40 +0000 Subject: [PATCH] update src/main/java/cn/zust/edu/cn/Point.java. Signed-off-by: Lves <16744448+tong-zhehui@user.noreply.gitee.com> --- src/main/java/cn/zust/edu/cn/Point.java | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/main/java/cn/zust/edu/cn/Point.java b/src/main/java/cn/zust/edu/cn/Point.java index 5661ad0..c04244a 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 + ")"; + } } -- Gitee