/** I am a "Group" interface. I model any object that can call itself a "group". If you want to be a "Group" type you must implement the methods below. */ public interface Group { public String title(); public int size(); }
public class StudentClub implements Group { public String name; public List<String> members; public String title() { return this.name; } public int size() { return this.members.size(); } //etc (more code follows) }