178k views
1 vote
Need comments added to the following java code:

public class Point {

private double x;

private double y;

private String type;

public void setXY(double xx, double yy) {
x = xx;
y = yy;
}

public double getY() {
return y;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public double[] getDimensions() {
return new double[] { x, y };
}

public String toString() {
return "Point [" + x + ", " + y + "] is " + type;
}
}

User Zsawaf
by
2.9k points

1 Answer

7 votes

Answer: Are there options for this?

Step-by-step explanation:

User Peterdn
by
3.7k points