Code:
class Punkt2D {
//Attribute
double x, y;
//Default-Konstruktor ohne Parameter => 0 init.
Punkt2D (){
x = 0.0;
y = 0.0;
}
//Konstruktor mit Parameter
Punkt2D(double xKoor, double yKoor){
x = xKoor;
y = yKoor;
}
}
funzt es so?
Habe atm keine Umgebung wo ich Code testen könnte :O