public abstract class CoordinatePair {
    double x, y;
    
    public CoordinatePair() { x=0.0; y=0.0; }
    
    public CoordinatePair(double X, double Y) { set(X,Y); }

    public CoordinatePair(CoordinatePair template) { x = template.x; y = template.y; }

    public boolean equals(CoordinatePair c) {
	return c.x == x && c.y == y;
    }
    
    public Object clone() {
	try { return super.clone(); }
	catch(CloneNotSupportedException e) { return null; }
    }

    public void set(double X, double Y) { x=X; y=Y; }
    
    public abstract void scale(double value);
    
    public abstract void rotate(double angle);
    
    public abstract double norm();

    public abstract double length();

    public abstract double angle();
	
    public abstract void normalize() throws IllegalStateException;
}
