public abstract class FictionalCharacter implements Comparable{ private String name; private static int memberCount = 0; public FictionalCharacter(){ memberCount++; } public FictionalCharacter(String name){ this.name = name; memberCount++; } public String getName(){ return name; } public void setName(String name){ this.name = name; } abstract double computeStrength(); public int compareTo(FictionalCharacter other){ if(computeStrength()-other.computeStrength()>0){ return 1; } if(computeStrength()-other.computeStrength()<0){ return -1; } return 0; } public static int mememberCount(){ return memberCount; } }