/* +----------------+ | PhList | +----------------+ | IPhList phlist | +----------------+ */ //wrapper class for IPhList class PhList{ IPhList phlist; PhList(IPhList phlist){ this.phlist=phlist;} //effect:mutate this list so that the first phone entry with //the given name is removed void remove(String name){ this.phlist=this.phlist.remove(name); } //effect:mutate this list so that a given entry is added void add(PhEntry phone){ this.phlist= new ConsPhList(phone, this.phlist); } // represent this list as a string public String toString(){ return "new PhList(this.phlist = " + this.phlist.toString() + ")"; } }