@@ -0,0 +1,1290 @@
+public String golfingBrothers(int%5B%5D adam, int%5B%5D bob, int%5B%5D craig) %7B %0A%0A    ArrayList%3CInteger%3E adamList = new ArrayList%3CInteger%3E();%0A    for (int i=0; i%3Cadam.length; i++)%0A    %7B%0A       adamList.add(adam%5Bi%5D);%0A    %7D%0A    ArrayList%3CInteger%3E bobList = new ArrayList%3CInteger%3E();%0A    for (int i=0; i%3Cbob.length; i++)%0A    %7B%0A       bobList.add(bob%5Bi%5D);%0A    %7D%0A    ArrayList%3CInteger%3E craigList = new ArrayList%3CInteger%3E();%0A    for (int i=0; i%3Ccraig.length; i++)%0A    %7B%0A       craigList.add(craig%5Bi%5D);%0A    %7D%0A%0A    return golfingBrothersB(adamList, bobList, craigList);%0A    %0A%7D%0A%0Apublic double average(ArrayList%3CInteger%3E list) %7B%0A  double total = 0;%0A  for (int item : list) total += item;%0A  return total / list.size();%0A%7D%0A%0Apublic String golfingBrothersB(ArrayList%3CInteger%3E adamList,%0A                               ArrayList%3CInteger%3E bobList,%0A                               ArrayList%3CInteger%3E craigList)%0A%7B%0A  double adamAvg = Double.MAX_VALUE, bobAvg = Double.MAX_VALUE, craigAvg = Double.MAX_VALUE;%0A  if (adamList.size() %3E= 2) adamAvg = average(adamList);%0A  if (bobList.size() %3E= 2) bobAvg = average(bobList);%0A  if (craigList.size() %3E= 2) craigAvg = average(craigList);%0A%0A  if (adamAvg %3C= bobAvg && adamAvg %3C= craigAvg) return %22adam%22;%0A  if (bobAvg %3C= adamAvg && bobAvg %3C= craigAvg) return %22bob%22;%0A  return %22craig%22;%0A%7D%0A

Create golfingBrothers.java