Do not model the role as a type of person. A person must have a set of roles
public enum Role {
PLAYER,
COACH,
REF
}
public class Player {
private final String name;
private Collection<Role> roles = new ArrayList<Role>();
public Player(String name) {
this.name = name;
}
public void addRole(Role role) {
this.roles.add(role);
}
}
source
share