/* An instance of this class represents a person having a name and ** a list of friends (each of which is also a person). */ public class Person { // instance variables // ------------------ private String name; private Object otherData; // constructor // ----------- public Person(String name, Object other) { this.name = name; setOtherData(other); } public Person(String name) { this(name, null); } // observers // --------- /* Returns this Person's name. */ public String nameOf() { return name; } public Object otherData() { return this.otherData; } public String toString() { return name; } // mutators // -------- public void setOtherData(Object other) { this.otherData = other; } }