package xmp_parent;

public class RightTriangle extends Shape {
	double base;
	double height;
	public RightTriangle(Point llc, double base, double height) {
		super(llc); 
		this.base = base;
		this.height = height;
	}
	
	public void grow(double factor) { base*=factor; height*=factor; }
	public Point getul() { Point ul=new Point(getllc()); ul=ul.move(0,height); return ul; }
	public Point getlr() { Point lr=new Point(getllc()); lr=lr.move(base,0); return lr; }
	public Point getur() { Point ur=new Point(getllc()); ur=ur.move(base,height); return ur; }
	public String toString() { return super.toString() + " -> " + getul() + " -> " + getlr(); }

}
