CS1 Standard Demo Page

The following text was written to the standard output stream when the Person program was executed from Netbeans.

/*
* People program
*/
  package people;
  
  /**
   *
   * @author dmaslows
  */
 public class Person implements PersonSpecification {
    private String firstName;
     private String lastName;
     private int month;
    private int day;
    private int year;
 
 public Person(String name, int month, int day, int year) {
     firstName = name.substring(0, name.indexOf(" "));
     lastName = name.substring(name.indexOf(" ")+1);
     this.month = month;
     this.day = day;
     this.year = year;
     }
 
 
 @Override
 public String toString() {
     return firstName + " " + lastName + ", born " + month + "/" + day + "/" + year;
 }
 
 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;
     }

     public String initials() {
         return firstName.substring(0,1)+lastName.substring(0,1);
     }
 
     public boolean isBoomer() {
         return year >= 1946 & year <= 1964;
    }

 }