import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.util.*;
import javax.imageio.*;

/**
 * Write a description of class Rectangle here.
 *
 * @author McKinley
 * @version April 2007
 */
public class Rectangle extends Shapes  
{
    // rectangle instance variables
    protected static String name = "Rectangle";
    protected int width;
    protected int height;

    /**
     * Default Constructor
     */
    public Rectangle()
    {
        width = 0;
        height = 0;
    }
    /**
     * Constructor with arguements
     */
    public Rectangle(int w, int h)
    {
        width = w;
        height = h;
    }
    // Set and Get methods for
    public void setWidth(int w) {
        width = w;
    }
    public void setHeight(int h) {
        height = h;
    }
    public int getWidth() {
        return width;
    }
    public int getHeight() {
        return height;
    }
    // Draw the rectangle at point x, y in the DrawingBox
    public void draw(DrawingBox box, int x, int y) {
        box.drawRect(x, y, width, height);
    }
    public String toString() {
        return ("Rectangle.toString(): " + width + " width by " + height + " height " + name);
    }
}
