public class Weight implements Comparable<Weight> {
private int weight;
+ Weight() {
+ }
+
Weight(int weight) {
setWeight(weight);
}
@Override
public int compareTo(Weight weight) {
- int distance = weight.weight - this.getWeight();
+ int distance = weight.getWeight() - this.getWeight();
if (distance >= 0)
return distance;
else