Quote (ice060788 @ Nov 6 2014 08:09pm)
Yeah I did, I even emailed the instructor about it and waiting to here back from him. The code he provided has stat1.getData and not stat2.getData which is what I thought it should be
AH! See this is what happens when you don't read the instructions:
getData()—This is an accessor (get or getter) method used to retrieve the values of data. This
method should not return a reference to data.
Instead, it should create a new array containing
exactly the values contained in data, and then return a reference to this new array.
You aren't doing that. if you did that, then you would get the false, true, true you are looking for.
Also,
setData(double[] d) —This is a mutator (set or setter) method used to set the values of the
data array.
The method should create a new array containing exactly the elements of d and assign to
data a reference to this new array (that is, the method should not simply assign d to data).
You aren't doing that either.
This post was edited by Minkomonster on Nov 6 2014 07:13pm