package pr03; public class DiningIn extends Restaurant implements Comparable { int capacity; public DiningIn(String name, int capacity) { super(name); this.capacity = capacity; } public int getCapacity() { return capacity; } public String toString() { return "Dining In "+super.toString() + ", capacity = "+capacity; } public int compareTo(Object obj) { DiningIn otherObject; otherObject = (DiningIn)obj; return capacity - otherObject.capacity; } }