/**
 * @author CPSC Instructors
 * @date 14 Apr 2010
 *
 * Extend NamedBunny class so that it extends the Comparable interface
 */

public class SortableBunny extends NamedBunny implements Comparable {
 public SortableBunny() {
  super();
 } 
 public SortableBunny(int x, int y, int carrots, String name) {
  super(x,y,carrots,name);
 }
 /* compare by name alphabetical order */
 public int compareTo(Object other) 
 {
  return this.getName().compareTo(((SortableBunny)other).getName());
 }
}
	
