Can anyone help with this? The part that is the biggest problem is the addValue method as I do not know how to resize arrays. I think I have done the other parts successfully though. Your help would be much appreciated.
/* Your task is to develop a class ExperimentData which holds int data values. The class has two constructors ExperimentData() which allocates an array of some default size and ExperimentData(int n) which allocates 'n' locations for the data. You will also provide code for the method addValue(int value) which adds an int to the data, a method findSum() which returns with the sum of the data and findZeros() which finds the total number of zeroes in the data. We have provided a class Tester which tests this class out. Use an array for the storage of the ints and do not worry about any errors */
public class ExperimentData {
//instance variables
public ExperimentData() { //student code here }
public ExperimentData(int n) { //Student code here }
public void addValue(int value){ //Student code here }