Page 874 - AP Computer Science A, 7th edition
P. 874
23. (E) All implementations are correct. This is not a question about whether it is better to compare ExpertPlayers based on their ratings or their names! One might need an alphabetized list of players, or one might need a list according to ranking. In practice, the program specification will instruct the programmer which to use. Note that segment II is correct because compareTo doesn’t need to return 1 or −1. Any positive or negative integer is OK. Note also that in segments I and II it is OK to use expert.rating, since expert is of type ExpertPlayer, the current class being written. Normally, a parameter of some class type cannot access the private instance variables of another class.