/**
 * Luennolla 22 syyskuuta 2000 kirjoitettua esimerkkikoodia. 
 * Javan perusteita. 
 * Luomme tassa oman luokkamme neliskulmioiden kasittelyyn. 
 */
public class Rectangle
{
    // Ilmentymamuuttujia
    int x;
    int y;
    int width = 5;
    int height;

    /**
     * Parametriton eli oletuskonstruktori
     */
    public Rectangle()
    {
	x = 15;
	y = 24;
	width = 10;
    }

    public Rectangle(int width, int height)
    {
	// Kutsutaan oletuskonstruktoria
	this();
	this.width = width;
	this.height = height;
    }

    /**
     * Tavallisia metodeja
     */
    public int getXLocation()
    {
	return x;
    }
   
    public void setXLocation(int x)
    {
	this.x = x;
    }
}

