PersonDemo1.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. 
5     * 
6     */
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("Pharrel, 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 ta = new Person("Tristan Allen", 6,20,2002);
22   
23   
24           //DISPLAY THE SIX PERSON OBJECTS TO THE STANDARD OUTPUT STREAM
25           System.out.println(bd + " " + bd.initials() + " " + bd.isBoomer());
26           System.out.println(nr + " " + nr.initials() + " " + nr.isBoomer());
27           System.out.println(pw + " " + pw.initials() + " " + pw.isBoomer());
28           System.out.println(fs + " " + fs.initials() + " " + fs.isBoomer());
29           System.out.println(dk + " " + dk.initials() + " " + dk.isBoomer());
30           System.out.println(ta + " " + ta.initials() + " " + ta.isBoomer());
31       }
32   }
33