/home/sjenks/NetBeansProjects/CS1/src/people/PersonDemo2.java
 1 /*
 2  * To test out the Person class and get practice using arrays as well. 
 3  */
 4 package people;
 5 
 6 /**
 7  *
 8  * @author sjenks
 9  */
10 public class PersonDemo2 {
11 
12     /**
13      * @param args the command line arguments
14      */
15     public static void main(String[] args) {
16         // CRFEATE AN ARRAY OF PERSON OBJECTS OF SIZE 6 AND FILL IT WITH THE DATA
17         Person[] people = new Person[6];
18         people[0]= new Person("Bob Dylan",5,24,1941);
19         people[1]= new Person("Noomi Rapace",12,28,1974);
20         people[2] = new Person("Pharrell Williams",4,5,1973);
21         people[3] = new Person("Frank Sinatra",12,12,1915);
22         people[4] = new Person("Diana Krall",11,16,1964);
23         people[5] = new Person("Samantha Jenks",7,18,1999);
24         
25         //USE A FOR LOOP TO DISPLAY THE SIX PERSON OBJECTS IN THEIR TEXTUAL FORM
26         for (int i=0;i<6; i=i +1){
27         System.out.println(people[i]);
28     }
29     
30 }
31 }