public class Rectangle { // the Rectangle class has 3 fields private int width; private int height; private Point origin; // the Rectangle class has two constructors public Rectangle(int initWidth, int initHeight, Point initOrigin) { width = initWidth; height = initHeight; origin = initOrigin; } public Rectangle(int initWidth, int initHeight, int xPos, int yPos) { width = initWidth; height = initHeight; origin = new Point(xPos,yPos); } public Rectangle(int initWidth, int initHeight) { width = initWidth; height = initHeight; origin = null; } // the Rectangel class has 3 methods public void setWidth(int newWidth ) { width = newWidth; } public int getWidth() { return width; } public void setHeight(int newHeight ) { height = newHeight; } public int getHeight() { return height; } public void setOrigin(Point newOrigin) { origin = newOrigin; } public Point getOrigin() { return origin; } }