public class Rectangle { int x; int y; int width; int height; // // Simple accessor methods are typically called "getters" // /** * Return the x coordinate value. */ public int getX() { return x; } /** * Return the y coordinate value. */ public int getY() { return y; } /** * Return the width. */ public int getWidth() { return width; } /** * Return the height. */ public int getHeight() { return height; } // // Simple mutator methods are typically called "setters". // /** * Set the x coordinate to the given int value. */ public void setX(int x) { this.x = x; } /** * Set the y coordinate to the given int value. */ public void setY(int y) { this.y = y; } /** * Set the width to the given int value. */ public void setWidth(int width) { this.width = width; } /** * Set the height to the given int value. */ public void setHeight(int height) { this.height = height; } // ... other methods of the Rectangle class, as shown in ../Rectangle.java }