PersonDemo1.java
1    /* 
2    *PersonDemo1 is a simple program to create and textually display Person objects, 
3    * together with initials and an indication of whether or not the person is a baby boomer. 
4    * 
5    * person object that uses person class 
6    * Person[] can be used here 
7     */
8    
9    package people;
10   
11   public class PersonDemo1 {
12   
13       public static void main(String[] args) {
14   
15           //CREATE THE SIX PERSON OBJECTS
16           Person bd = new Person("Bob Dylan",5,24,1941);
17           Person nr = new Person("Noomi Rapace",12,28,1974);
18           Person pw = new Person("Pharrell Williams",4,5,1973);
19           Person fs = new Person("Frank Sinatra",12,12,1915);
20           Person dk = new Person("Diana Krall",11,16,1964);
21           Person ct = new Person("Chyenne Tiller",10,14,2000);
22   
23           //DISPLAY THE 6 PERSON OBJECT TO STANDARD OUTPUT STREAM
24           System.out.println(bd + " " + bd.initials() + " " +  bd.isBoomer());
25           System.out.println(nr + " " + nr.initials() + " " +  nr.isBoomer());
26           System.out.println(pw + " " + pw.initials() + " " +  pw.isBoomer());
27           System.out.println(fs + " " + fs.initials() + " " +  fs.isBoomer());
28           System.out.println(dk + " " + dk.initials() + " " +  dk.isBoomer());
29           System.out.println(ct + " " + ct.initials() + " " +  ct.isBoomer());
30       }
31   }
32