1 2 package people; 3 4 public class PersonDemo1 { 5 6 public static void main(String[] args) { 7 8 /* 9 a program to create and textually display Person objects, 10 together with initials and an indication of whether or not the person is a baby boomer 11 */ 12 13 //Introducing people 14 Person bd = new Person ("Bob", "Dylan", 5,24,1941); 15 Person nr = new Person ("Noomi", "Rapace", 12,28,1974); 16 Person pw = new Person ("Pharrell", "Williams", 4,5,1973); 17 Person fs = new Person ("Frank", "Sinatra", 12,12,1915); 18 Person dk = new Person ("Diana", "Krall", 11,16,1964); 19 Person ar = new Person ("Alexander", "Robinson", 7,19,2001); 20 //Output List 21 System.out.println("\nList of People: "); 22 System.out.println(bd + " " + bd.initials() + " " + bd.isBoomer()); 23 System.out.println(nr + " " + nr.initials() + " " + nr.isBoomer()); 24 System.out.println(pw + " " + pw.initials() + " " + pw.isBoomer()); 25 System.out.println(fs + " " + fs.initials() + " " + fs.isBoomer()); 26 System.out.println(dk + " " + dk.initials() + " " + dk.isBoomer()); 27 System.out.println(ar + " " + ar.initials() + " " + ar.isBoomer()); 28 } 29 } 30