public class PointV2 {
    private double x; // Ahora son private
    private double y;
    public PointV2(double x, double y) {
        this.x = x;
        this.y = y;
    }
    public double getX() { // Accedo a traves de getters
        return this.x;
    }
    public double getY() {
        return this.y;
    }
    public void setX(double x) { // Y setters
        this.x = x;
    }
    public void setY(double y) {
        this.y = y;
    }
    public void invertCoordinates() {
        double aux = x;
        x = y;
        y = aux;
    }
    @Override
    public String toString() {
        return "(" + x + "," + y + ")";
    }
}
