//public class Cartoon { public class Cartoon implements Comparable{ public String name; public int startYear; public int endYear; public double stars; public int compareTo(Cartoon that){ if( this.stars < that.stars ){ return -1; }else if( this.stars > that.stars ){ return +1; }else{ return this.name.compareTo(that.name); } } public Cartoon(String name, int start, int end, double stars){ this.name = name; this.startYear = start; this.endYear = end; this.stars = stars; } }