package newpackage;
import java.awt.*;
public class Rectangle
{
private int width, height, x, y;
private Color color;
public Rectangle (int wid, int hei, Color shade, int upperX, int upperY)
{
width = wid;
height = hei;
color = shade;
x = upperX;
y = upperY;
}
public void draw (Graphics page)
{
page.setColor (color);
page.fillRect(x, y, width, height);
}
public void setWidth (int wid)
{
width = wid;
}
public void setHeight (int hei)
{
height = hei;
}
public void setColor (Color shade)
{
color = shade;
}
public void setX (int upperX)
{
x = upperX;
}
public void setY (int upperY)
{
y = upperY;
}
public int getWidth ()
{
return width;
}
public int getHeight ()
{
return width;
}
public Color getColor ()
{
return color;
}
public int getX ()
{
return x;
}
public int getY ()
{
return y;
}
}