public class List2 { private final int MAX = 50; private String[] name; private int[] score; private int length; public List2() { length = 0; name = new String[MAX]; score = new int[MAX]; } public void insert(String n, int s) { name[length] = n; score[length] = s; length ++; } public double average() { int sum = 0; for(int i=0; i