Sorry to bother you but i have a question on the homework. I finished 
the two other methods but i cant get the main method to work. I will 
accept one number then give an arrayOutOfBounds error. This is what i have:

 public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int i = 0;
    double sum = 0;
    double average = 0; 
    int[] a = new int[0];
    do {
      System.out.print(One.toString(a) + "Enter a number or bye: ");
      String input = scan.nextLine();
      if (input.equals("bye"))
        break;
      else {
          int inputInt = Integer.parseInt(input);
          a = One.copyOf(a, a.length + 1);
          a[i] = inputInt;
          i++;
          sum += a[i];
           }
 
    } while (true); 
    average = sum / i;
    System.out.println(sum + ", " + i + ", " + average);
  }