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); } // the Rectangel class has 3 methods void setWidth(int newWidth ) { width = newWidth; } int getWidth() { return width; } void setHeight(int newHeight ) { height = newHeight; } int getHeight() { return height; } Point getOrigin() { return origin; } void setOrigin(Point newOrigin) { origin = newOrigin; } void setOrigin(int newX, int newY) { origin.setX(newX); origin.setY(newY); } }