.
This commit is contained in:
26
bac1/q2/algo/tp2/Point.java
Normal file
26
bac1/q2/algo/tp2/Point.java
Normal file
@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user