// A Rectangle class
public class Rectangle {
  // 4 instance attributes
  public double width;
  public double height;
  public double originX = 0.0;
  public double originY = 0.0;
  // 1 static attributes
  public static final int NUMBER_OF_SIDES = 4;
  // method: move the rectangle
  public void move(double dx, double dy) {
	   originX += dx;
	   originY += dy;
  }
  // method: compute the area of the rectangle
  public double getArea() {
    return width * height;
  }
  // method: compute the area of the rectangle
  public double getPerimeter() {
    return 2 * (width + height);
  }
  // 3 overloaded constructors
  public Rectangle() { width = 1.0; height = 1.0; }
  public Rectangle(double w, double h) {
	   width = w;
	   height = h;
  }
  public Rectangle(double w, double h, double originX, double originY) {
	   this.originX = originX;
     this.originY = originY;
	   width = w;
	   height = h;
  }
}
