//to represent a nonempty list of phone entries public class ConsPhList implements IPhList { private PhEntry first; private IPhList rest; public ConsPhList(PhEntry first, IPhList rest){ this.first = first; this.rest = rest; } // represent this list as a string public String toString(){ return new String("new ConsPhList(" + "first: "+ this.first.toString() + ",\n" + "rest: "+ this.rest.toString() + ")"); } }