/* *This program will model a person by 5 properties, their first name, their last name, the year, the month, * and the day they were born. */ package people; public class Person implements PersonSpecification{ private String firstName; private String lastName; private int month; private int year; private int day; public Person(String name, int month, int day, int year){ this.month = month; this.year = year; this.day = day; firstName = name.substring(0, name.indexOf(" ")); lastName = name.substring(name.indexOf(" ")+1); } public String toString(){ String person=(firstName +" "+ lastName+", born "+month+"/"+day+"/"+year); return person; } public String firstName() { return firstName; } public String lastName() { return lastName; } public int month() { return month; } public int year() { return year; } public int day() { return day; } public String initials() { String initials=firstName.substring(0,1)+lastName.substring(0,1); return initials; } public boolean isBoomer() { return (year < 1964 && year > 1946); } }