From 81e51d1a04d6fbcbc4365a78975d383e35d04ac5 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 11 Aug 2019 17:58:50 -0600 Subject: add documentation --- src/Q9/Robot.java | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/Q9/Robot.java') diff --git a/src/Q9/Robot.java b/src/Q9/Robot.java index 787f7cc..ee495e6 100644 --- a/src/Q9/Robot.java +++ b/src/Q9/Robot.java @@ -37,6 +37,7 @@ public class Robot { /** * Constructs an instance of a robot. + * * @param x the x coordinate of the robot. * @param y the y coordinate of the robot. */ @@ -45,37 +46,27 @@ public class Robot { this.y = y; } - /** - * @return the x coordinate - */ + /** @return the x coordinate */ public int getX() { return x; } - /** - * @return the y coordinate - */ + /** @return the y coordinate */ public int getY() { return y; } - /** - * @param x the x coordinate to move to. - */ + /** @param x the x coordinate to move to. */ public void setX(int x) { this.x = x; } - /** - * @param y the y coordinate to move to. - */ + /** @param y the y coordinate to move to. */ public void setY(int y) { this.y = y; } - /** - * @return true if the robot is at the given coordinate - */ + /** @return true if the robot is at the given coordinate */ public boolean atPosition(int x, int y) { return getX() == x && getY() == y; } -- cgit v1.2.3