1 /* 2 * PersonDemo2 is a simple program to create and textually display Person objects, together with initials and an indication of whether or not the person is a baby boomer, differing from PersonDemo1 3 * through the use of this program's Main Method featuring an array of Person objects. 4 */ 5 6 package people; 7 8 public class PersonDemo2 { 9 public static void main(String[] args) { 10 11 // CREATE AN ARRAY OF PERSON OBJECTS OF SIZE 6 AND FILL IT WITH THE DATA 12 Person[] people = new Person[6]; 13 people[0] = new Person("Bob Dylan", 5, 24, 1941); 14 people[1] = new Person("Noomi Rapace", 12, 28, 1974); 15 people[2] = new Person("Pharrell Williams", 4, 5, 1973); 16 people[3] = new Person("Frank Sinatra", 12, 12, 1915); 17 people[4] = new Person("Diana Krall", 11, 16, 1964); 18 people[5] = new Person("Quinn Ceilly", 3, 25, 1999); 19 20 // USE A LOOP TO DISPLAY THE SIX PERSON OBJECTS IN THEIR TEXTUAL FORM 21 for (int i = 0; i < people.length; i++ ) { 22 System.out.println(people[i].firstName() + " " + people[i].lastName() + ", born" + " " + people[i].month() + 23 "/" + people[i].day() + "/" + people[i].year() + " " + people[i].initials() + " " + people[i].isBoomer()); 24 } 25 26 } 27 }