I'm still working on that problem. I can't figure it out, would it be possible to give me a similar example, or even would you know where can I look for a tutorial on the subject.:)
Well I will repeat myself. In the calcSubstitutionScore you create new List: List<Integer> subScore = new ArrayList<Integer>()
that has no elements inside. And then you are trying to access it, so naturally this: subScore.get(tmaMarks) will not work since it has no elements.
Shouldn't you be using the private subScore List after you enter some values to it, instead of creating a new one with no values?
Secondly, did the average method had an argument or you added it. Because I believe that it should calculate the average value of one the lists declared in the class, but again I don't know what it is supposed to do.