//******************************************************************** // studentbody.java Author: Pat Moss Rev: 01 10-29-2005 // // Demonstrates the use of an aggregate class //******************************************************************** public class studentbody { //----------------------------------------------------------------- // Creates some address and student objects // and three test scores and prints them //----------------------------------------------------------------- public static void main (String[] args) { address school = new address ("800 Lancaster Ave.", "Villanova", "PA", 19085); address jhome = new address ("21 Jump Street", "Lynchburg", "VA", 24551); student john = new student ("John", "Smith", jhome, school); address mhome = new address ("123 Main Street", "Euclid", "OH", 44132); student marsha = new student ("Marsha", "Jones", mhome, school, 90, 95, 100); john.setTestScore(1, 80); john.setTestScore(2, 85); john.setTestScore(3, 90); // marsha.setTestScore(1, 90); // marsha.setTestScore(2, 95); // marsha.setTestScore(3, 100); System.out.println (john); System.out.println (); System.out.println (marsha); } }