I was wondering if the following code returns a sum of all the doubles in a text file. It seems to always appear as 0.0 when I test run it. What could be the problem? I

```
public double honorsCalculation() throws IOException {
    Scanner test = new Scanner(new File("Calculus - Test.txt"));
    while (test.hasNext()) {
        ArrayList <Double> assignments = new ArrayList <Double> ();
        double num = test.nextDouble();
        assignments.add(num);
        for (int i = 1; i < assignments.size() - 1; i++) {
            sum = sum + assignments.get(i);
            percentage = sum;
        }
    }
    return percentage;
}

```