24 lines
401 B
Java
24 lines
401 B
Java
|
|
/**
|
|
* Beschreiben Sie hier die Klasse punkt.
|
|
*
|
|
* @author (Ihr Name)
|
|
* @version (eine Versionsnummer oder ein Datum)
|
|
*/
|
|
public class Punkt
|
|
{
|
|
double x; //Attrbibute
|
|
double y;
|
|
|
|
public Punkt (double _x, double _y){ //andere Variabeln benötigt, parameter
|
|
x = _x;
|
|
y = _y;
|
|
}
|
|
|
|
public String toString(){
|
|
return "(" + x + " | "+ y + ")";
|
|
}
|
|
}
|
|
|
|
|