import java.awt.Point;

public class MyMathImplFull implements MyMath {

	public double euclideanDistance(Point a, Point b) throws IllegalArgumentException {
		
		if (a == null || b == null) {
			throw new IllegalArgumentException("Null is not allowed as argument.");
		}
		
		int delta_x = a.x - b.x;
		int delta_y = a.y - b.y;
		
		if (a.x == b.x) {
			return Math.abs(delta_y);
		}
		else if (a.y == b.y) {
			return Math.abs(delta_y);
		}
		else {
			return Math.sqrt(delta_x * delta_x + delta_y * delta_y);
		}
	}
	
	public boolean login(String user, String pass) {
		
		if ( ( user == "Hans" && pass == "1234" ) || 
				( user == "Wurst" && pass == "5678" ) ){
			return true;
		} else {
			return false;
		}
	
	}
	
}

