/home/evankemp/NetBeansProjects/CS1/src/people/PersonDemo2.java
 1 /*
 2  * PersonDemo1 is a simple program to create and textually display Person
 3  * objects, together with initials and an indication of whether or not the 
 4  * person is a baby boomer. Featuring array.
 5  */
 6 package people;
 7 
 8 /**
 9  *
10  * @author evankemp
11  */
12 public class PersonDemo2 {
13 
14     /**
15      * @param args the command line arguments
16      */
17     public static void main(String[] args) {
18         
19         //CREATE AN ARRAY OF PERSON OBJECTS OF SIZE 6 AND FILLE IT WITH THE DATA
20         Person[] person = new Person[6];
21         person[0] = new Person("Bob Dylan",5,24,1941);
22         person[1] = new Person("Noomi Rapace",12,28,1974);
23         person[2] =  new Person("Pharell Williams",4,5,1973);
24         person[3] =  new Person("Frank Sinatra",12,12,1915);
25         person[4] =  new Person("Diana Krall",11,16,1964);
26         person[5] = new Person("Elina Van Kempen",1,4,2000); 
27         
28         //USE A FOR LOOP TO DISPLAY THE SIX PERSON OBJECTS IN THEIR TEXTUAL FORM
29         for (int i = 0; i<person.length; i++) {
30             System.out.println(person[i]+ " " + person[i].initials() + " " + person[i].isBoomer());
31         }
32     }
33     
34 }
35