Person.java
package people;

import org.w3c.dom.ls.LSOutput;

public class Person implements PersonSpecification{
    private String firstName;
    private String lastName;
    private int month;
    private int day;
    private int year;

    //Hereby the constructor comes for define values
    public Person(String name, int month, int day, int year){
    int nameDivider = name.indexOf(" ");
    this.firstName = name.substring(0, nameDivider) ;
    this.lastName = name.substring(nameDivider);
    this.month = month;
    this.day = day;
    this.year = year;
    }
    // Constructor
    public String firstName(){
        return firstName;
    }

    public String lastName(){
        return lastName;
    }

    public int month(){
        return month;
    }

    public int day(){
        return day;
    }

    public int year(){
        return year;
    }

    @Override
    public String initials() {
        return firstName.substring(0, 1) + "." + lastName.substring(1,2);
    }

    @Override
    public boolean isBoomer() {
        return (year >= 1937) & (year <= 1956);
    }

    public String toString(){
        return firstName() + "" + lastName() + ", born " + month() + "/" +day()+"/"+year();
    }
}