import java.awt.*; public class Point { int x; int y; // Constructs a point at the origin. public Point() { x = 0; y = 0; } // Constructs a point at an initial x and y value. public Point(int initialX, int initialY) { x = initialX; y = initialY; } // Draws a point using the given Graphics object. public void draw(Graphics g) { g.fillOval(x, y, 3, 3); g.drawString("(" + x + ", " + y + ")", x, y); } // Sets the point at a new location. public void setLocation(int newX, int newY) { x = newX; y = newY; } // Moves a point by a given x, y amount. public void translate(int dx, int dy) { setLocation(x + dx, y + dy); } }