class Dreieck implements Fläche {
public boolean punktLiegtDrin(double x, double y) {
return y < 1 - x;
}
public double getXMin() {
return 0;
}
public double getXMax() {
return 1;
}
public double getYMin() {
return 0;
}
public double getYMax() {
return 1;
}
}
class Sinusbauch implements Fläche {
public boolean punktLiegtDrin(double x, double y) {
return y < Math.sin(x);
}
public double getXMin() {
return 0;
}
public double getXMax() {
return Math.PI;
}
public double getYMin() {
return 0;
}
public double getYMax() {
return 1;
}
}