public class Demonstrate {
 public static void main (String argv[]) {
  int counter, sum = 0; 
  Attraction attractions[] = {new Movie (4, 7, 3),
                              new Movie (8, 8, 7),
                              new Symphony (10, 9, 3),
                              new Symphony (9, 5, 8)};
  for (counter = 0; counter < attractions.length; ++counter) { 
    sum = sum + attractions[counter].rating(); 
  } 
  System.out.print ("The average rating of the " + attractions.length);
  System.out.println (" attractions is " + sum / attractions.length);
 }
}
