Person.java
1    /* 
2    *Model a person in terms of five properties, first name and last name (String Values), month,day, and year of birth 
3     */
4    package people;
5    
6    public class Person {
7        // Instance variables
8        private String firstname;
9        private String lastName;
10       private int month;
11       private int day;
12       private int year;
13   
14       // Constructor
15       public Person(String name,  int month, int day, int year){
16           int space= name.indexOf(" ");
17           firstname=name.substring(0,space);
18           lastName=name.substring(space+1);
19           this.month= month;
20           this.day= day;
21           this.year= year;
22       }
23       public String toString(){
24           String representation= "(" + firstname+ " born:"+ "/"+month+"/"+day+"/"+year +")";
25           return representation;
26       }
27   
28       public String initials() {
29           String firstletter= firstname.substring(0,1);
30           String lastletter= lastName.substring(0,1);
31           String Initials= firstletter+lastletter;
32           return Initials;
33       }
34   
35       public boolean isBoomer() {
36           return (year >= 1946 && year <= 1964);
37       }
38   }
39