Round 1: Round 2: Round 3: TotalScore:
Name 1: 3 3 3 45 (made up number)
Name 2: 4 5 3 43
Name 3: 5 3 4 43
Not 100% sure if this is what you were getting at, but it seems that you have a bunch of names and it has 4 sets, 3 for the rounds and one for the total.
Each name has 4 groups and there are three names, or so I'm guessing from your tidbit at the beginning.
Represent each name as an array and have each array store the four things it needs.
int[][] nameRecords = new int[3][4];
nameRecords[0][0] = 3;
nameRecords[0][1] = 3;
nameRecords[0][2] = 3;
nameRecords[0][3] = 45;
nameRecords[1][0] = 4;
nameRecords[1][1] = 5;
nameRecords[1][2] = 3;
nameRecords[1][3] = 43;
nameRecords[2][0] = 5;
nameRecords[2][1] = 3;
nameRecords[2][2] = 4;
nameRecords[2][3] = 43;
Also, I noticed that you were passing an array as a parameter and then modifying its first value over and over.
Also, you are incrementing the value of count[0] each time.
What is the count array for?
It only has the 0th index. I see why you are always incrementing that one. But why use an entire array for just one index?
Assuming that you are using it as an incrementer, then you are indeed changing each index of the array, which is fine.
You have me a bit confused, unless you're using the rounds as an index value, in which case that would work, otherwise why is it set to the final value of 2 when there are three rounds?
index 3 would be the total, which I'm not sure how you're getting that, as those first 3 numbers aren't adding up to those totals at all.
At least for your little tidbit at the very beginning of this post.
Oh. Totals is made up. I just noticed that now.
Assuming totals is round1 score + round2 score + round3 score, and I've no clue how the judges factor into this yet, but
for (int i = 0; i < nameRecords.length; i++)
{
int totals = 0;
for (int j =0; j < nameRecords[i].length; j++)
{
totals = totals + nameRecords[i][j];
}
nameRecords[i][nameRecords[i].length -1] = totals;
}