public class TestPerson { public static void main( String args[] ) { // partial test of Name class System.out.println("Test of Name class..."); Name n1 = new Name("Smokey", "The", "Bear"); System.out.println("The first full name is " + n1); System.out.println("The first name is " + n1.getFirst()); System.out.println("The middle name is " + n1.getMiddle()); System.out.println("The last name is " + n1.getLast()); n1.setMiddle("T."); System.out.println("The middle name is now " + n1.getMiddle()); System.out.println("The first full name is now " + n1); Name n2 = new Name("Bozo", "Clown"); System.out.println("The next full name is " + n2); n2.setMiddle(n1.getMiddle()); System.out.println("The modified name is " + n2); // partial test of Person class System.out.println("\nTest of Person class..."); Name samsName = new Name("Sam", "Ash"); Person sam = new Person(samsName, 'M'); System.out.println("sam: " + sam); sam.name.setMiddle("L."); System.out.println("sam: " + sam); Person pop = new Person(new Name("Popeye", "T.", "Sailor"), 'M'); System.out.println("pop: " + pop); pop.setId("123-45-6789"); System.out.println("pop: " + pop); // partial test of Student class System.out.println("\nTest of Student class..."); Name marysName = new Name("Mary", "Doe"); Student mary = new Student(marysName, 'F', 17, 3.25); System.out.println("mary: " + mary); System.out.println("\nEnd of test"); } } /* This is what the output should look like: C:\myjava>java TestPerson Test of Name class... The first full name is Smokey The Bear The first name is Smokey The middle name is The The last name is Bear The middle name is now T. The first full name is now Smokey T. Bear The next full name is Bozo Clown The modified name is Bozo T. Clown Test of Person class... sam: Sam Ash (sex: M) sam: Sam L. Ash (sex: M) pop: Popeye T. Sailor (sex: M) pop: Popeye T. Sailor (sex: M; id: 123-45-6789) Test of Student class... mary: Mary Doe (sex: F) Credits: 17.0 GPA: 3.25 End of test */