/**
 * Rectangle models the rectangle shape.
 */
public class Rectangle {

    // Instance variables to represent characteristics of a rectangle
    private int width;
    private int height;
    private String colour;

    /**
     * Initialize this Rectangle object to have a width of 'w',
     * a height of 'h', and to be the colour 'c'.
     */
    public void init (int w, int h, String c) {
        width = w;
        height = h;
        colour = c;
    }

    /**
     * Set the colour of this Rectangle object to the colour 'c'.
     */
    public void setColour (String c) {
        colour = c;
    }

    /**
     * Multiply both the width and height of this Rectangle object
     * by 'scale'.
     */
    public void scale (int scale) {
        width = width*scale;
        height = height*scale;
    }

    /**
     * Multiply the width of this Rectangle object by 'wScale' and the
     * height of this Rectangle object by 'hScale'.
     */
    public void scale (int wScale, int hScale) {
        width = width*wScale;
        height = height*hScale;
    }

    /*
     * This method calculates a new scale factor by adding 'a', the
     * product of 'b' and this Rectangle object's height, and the
     * product of 'c' and this Rectangle object's width.
     */
    public int scale (int a, int b, int c) {
        return a + b*height + c*width;
    }

    /**
     * Calculate and return the area of this Rectangle object.
     */
    public int area () {
        return width*height;
    }

    /**
     * Return information about the dimensions of this Rectangle object.
     */
    public String infoReport () {
        return "Shape: Rectangle  Width: " + width + "  Height: " + height;
    }
}

