import java.util.Scanner; public class ListDemo { public static void main(String[] args) // driver { List z = new List(); Scanner input = new Scanner(System.in); int num; while(input.hasNext()) { num = input.nextInt(); z.Insert(num); } z.Print(); int s = z.Sum(); System.out.println("sum = " + s); int len = z.getLength(); System.out.println("length = " + len); double avg = z.average(); System.out.println("average = " + avg); } }