import java.io.*; import java.util.*; public class Point implements Deplacable, Serializable { private double x; private double y; public Point() {} public Point(double x,double y) { this.x= x; this.y= y; } public Point(Point q) { this.x= q.x; this.y= q.y; } public double getX() { return x; } public double getY() { return y; } public void deplace(double dx, double dy) { this.x += dx; this.y += dy; } public boolean equals(Object q) { return (q instanceof Point) && ( this.x== ((Point)q).x && this.y==((Point)q).y ); } public String toString() { return "Point("+x+","+y+")"; } }