public class Person { // attributes private String id; // id of the person private int age; // age of the person private String bff; // id best friend for ever of the person // default constructor public Person() { this.setID( "" ); this.setAge( 0 ); this.setBFF( null ); } // specific constructor public Person( String s, int a, String b ) { this.setID( s ); this.setAge( a ); this.setBFF( b ); } // mutators // setID(): update Id attribute of person to s public void setID( String s ) { this.id = s; } // setAge(): if sensible, update age attribute of person to a public void setAge( int a ) { if ( a >= 0 ) { this.age = a; } } // setBFF(): update bff attribute of person to b public void setBFF( String b ) { this.bff = b; } // accessors // getID(): return the id of the person public String getID() { return this.id; } // getAge(): return the age of the person public int getAge() { return this.age; } // getBFF(): return the bff of the person public String getBFF() { return this.bff; } // other messages // toString(): return a text representation of the person public String toString() { String s = this.getID(); int a = this.getAge(); String b = this.getBFF(); String representation = s + "(" + a + ", " + b + ")" ; return representation; } // equals(): returns whether the people are the same (i.e., same id ) public boolean equals( Person p ) { String n1 = this.getID(); String n2 = p.getID(); boolean comparison = ( n1.equals( n2 ) ) ; return comparison; } // isAdult(): reports whether the person can vote public boolean isAdult() { return false; } // mature(): increase the age of the person by n years public void mature( int n ) { } // makeLoner(): remove the bff of the person (i.e., null out the bff) public static void makeLoner() { } // mutualBFF(): are the person and p mutual bff's public static boolean areMutualBFF( Person p ) { return false; } }