class Point{ private double first; private double second; Point(){ first = 0; second = 0; } Point(double x, double y){ first = x; second = y; } public double first(){ return first; } public double second(){ return second; } public double distance(){ return Math.sqrt(first*first+second*second); } public void translate(double deltaX, double deltaY){ first+=deltaX; second+=deltaY; } public String toString(){ return "("+first+","+second+")"; } }