Hey everyone new to the forum.

About myself I am a student doing my Computer Science Degree. I have went straight from A Level to Degree Level which is not good as I have no prgramming experience at all.

Can anyone please help. I have been given a practive assignment so far which asks to create a programme for production department of a business for its shift teams. Each shift team has 20 people.

I have to do a number of calculations in this programme and place them in seperate methods which i ahve done.

I am stuck on one at the moment. I have been asked to create a method which will allow me too take the two arrays, these are the amount of items shift teams have created over two years, and display the average amount produced for each shift team over the two years.

The problem I am having is how to access the two array positions corresponding with the one shift team and then calculate what i am looking.

Below I have placed my output statement below for this method, of what i have so far:

double yearaverage=YearlyStats(itemsyear);
System.out.println("The Average Production for Team " + (i+1) + " in year's 2008 and 2009 is" + yearaverage/2 );


Below is the method to calculate or even just access the two arrays

static int YearlyStats(int [] itemsyear)
{
int yearaverage=0;

for (int i=0; i>itemsyear.length; i++)
{
yearaverage=yearaverage+itemsyear[i];
}
return yearaverage;

}

I know the above is wrong most likely can someone please PLEASE HELP