1 /* 2 * Person is a simple program to create and textually display Person 3 * objects using first and last name, and date of birth(month/day/year) 4 */ 5 6 package people; 7 8 public class Person implements PersonSpecification { 9 10 private String firstName; 11 private String lastName; 12 private int month; 13 private int day; 14 private int year; 15 16 public Person(String name, int month, int day, int year){ 17 firstName = name.substring(0, name.indexOf(" ")); 18 lastName = name.substring(name.indexOf(" ") + 1, name.length()); 19 20 this.month = month; 21 this.day = day; 22 this.year = year; 23 } 24 25 public String toString(){ 26 return(firstName + " " + lastName + ", born " + month + "/" + day + "/" + year); 27 } 28 29 30 public String firstName() { 31 return null; 32 } 33 34 public String lastName() { 35 return null; 36 } 37 38 public int month() { 39 return 0; 40 } 41 42 public int day() { 43 return 0; 44 } 45 46 public int year() { 47 return 0; 48 } 49 50 public String initials() { 51 return (firstName.substring(0,1) + lastName.substring(0,1)); 52 } 53 54 public boolean isBoomer() { 55 return false; 56 } 57 } 58