/* This demonstrates the use of the ArrayList class This program implements project 3 using ArrayList */ // ArrayList is part of the java stanard API, it needs to be imported import java.util.ArrayList; import java.util.Scanner; public class proj3AL { public static void main(String[] args) { int size = 0; // how many values we'll be storing double sum = 0; // running sum used to calculate average Scanner easy = new Scanner(System.in); // notice that ArrayList is declared before I know how many // values we'll be reading. ArrayList is dynamic. ArrayList values = new ArrayList(); // ask the user how many values must be read, hold out for a good answer while(size <= 0) { System.out.println("Enter the number of values to read: "); size = easy.nextInt(); } // ask the user for the values for(int i=0; i average) { System.out.println(temp); } } } }