import java.util.Comparator; /* An instance of this class defines an ordering on states of the USA ** (as represented by objects of the StateInUSA class) according to ** their numbers of electoral votes. Among two states, the one with ** the larger number of electoral votes is defined to be less than the ** one with fewer electoral votes. (Thus, for example, if a collection ** of states is listed in ascending order in accord with this Comparator, ** they will be listed from most to least numbers of electoral votes. ** ** Authors: R. McCloskey and */ public class CompareByElectVotes implements Comparator { /* According to whether the number of electoral votes of stateA is ** greater than, equal to, or less than, respectively, that of stateB, ** returns either a negative number, zero, or a positive number, ** respectively. */ public int compare(StateInUSA stateA, StateInUSA stateB) { return 0; // STUB } }