import java.awt.Graphics2D;
import java.awt.Rectangle;

public class MyRectangle {
   private int x;
   private int y;
   private int width;
   private int height;
   
   
   public MyRectangle( int x, int y, int width, int height ) {
      this.x = x;
      this.y = y;
      this.width = width;
      this.height = height;
   }

   
   public void translate( int xchange, int ychange ) {
      x += xchange;
      y += ychange;
   }
   
   
   public void draw(Graphics2D g2)
   {
      Rectangle r = new Rectangle( x, y, width, height );
      g2.draw( r );
   }

   
   public int getHeight() {
      return height;
   }

   public int getWidth() {
      return width;
   }

   public int getX() {
      return x;
   }

   public int getY() {
      return y;
   }
   
   
   
}
