예제 #1
3
 public bool addFood(Food f)
 {
     if(f.getWeight() + weight > weightLimit) {
         return false;
     } else {
         foods.Add(f);
         weight += f.getWeight();
         return true;
     }
 }