You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your task is to change this compareTo implementation to compare using the rating attribute
Remeber your compareTo method should return 0 if ratings are equal, a positve number if this.rating is greather than other song's rating and a negative number otherwise
Run the sorting algorithm again to see the change in order (run JukeBox.java)
After this implement a RatingComparator which sorts according to the rating, if the ratings of two songs are equal then break the tie with the bpm attribute
have a look at the ArtistCompare comparator whcih sorts according to the artist name