cours_progra/q2/algo/tp2/Point.java

27 lines
281 B
Java
Raw Normal View History

2023-03-09 11:38:23 +01:00
public class Point {
private double x, y;
public String toString(){
return "("+ x+ ":" + y + ")";
}
Point(){
x = 0;
y = 0;
}
Point(double x, double y){
this.x = x;
this.y = y;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
}