I must fix two important details in the assignment specification. I've amended the comments in A1Driver.java
The file format of the file containing the list of points tells you that there will be one point on each line. What it does not tell you is that each of the values on a line should be separated by a space.
The get
method is not clear in how the points should be
ordered. They should be ordered by increasing distance from the
view point.
samePlane
was not sufficiently clear. If the
dimension number is k and the viewpoint has value
p in dimension k then you want to find all other
points whose value in dimension k equals p.
For example, if the viewpoint is at (3, 5, 2), and we call
samePlane(0)
, then samePlane
will print all points whose value in
the 0th dimension is 3 -- e.g., (3, 2, 4).