1 /* 2 This program will model a person in terms of five properties 3 first name and last name - Strings 4 moth, day, and year of birth - int values 5 */ 6 7 package people; 8 9 public class Person implements PersonSpecification { 10 // instance variables 11 12 private String firstName; 13 private String lastName; 14 private String name = firstName + lastName; 15 16 private int month; 17 private int day; 18 private int year; 19 20 // constructors 21 22 public Person(String name, int month, int day, int year) { 23 this.name = name; 24 this.month = month; 25 this.day = day; 26 this.year = year; 27 } 28 29 // methods 30 31 public String toString() { 32 String representation = name + ", born " + month + "/" + day + "/" + year; 33 return representation; 34 } 35 36 @Override 37 public String firstName() { 38 return firstName; 39 } 40 41 @Override 42 public String lastName() { 43 return lastName; 44 } 45 46 @Override 47 public int month() { 48 return month; 49 } 50 51 @Override 52 public int day() { 53 return day; 54 } 55 56 @Override 57 public int year() { 58 return year; 59 } 60 61 @Override 62 public String initials() { 63 String inititials = (firstName.substring(0) + lastName.substring(0)) ; 64 return inititials.toUpperCase(); 65 } 66 67 @Override 68 public boolean isBoomer() { // baby boomer ??? 69 return false; 70 } 71 } 72