package xmp_interface;

class Rectangle implements Shapes {
	Point llc;
	double width;
	double height;
	public Rectangle(Point llc,double width,double height) {
		this.llc=llc; this.width=width; this.height=height;
	}
	public void move(double xd, double yd) { llc=llc.move(xd,yd); }
	public void grow(double factor) { width*=factor; height*=factor; }
	public Point getllc() { return llc; }
	Point getul() { Point ul=new Point(llc); ul=ul.move(0,height); return ul; }
	Point getlr() { Point lr=new Point(llc); lr=lr.move(width,0); return lr; }
	public Point getur() { Point ur = new Point(llc); ur=ur.move(width,height); return ur; }
	public String toString() { return "Rectangle @ " + llc + " -> " + getur() ; }
}
