Exemple #1
0
 public void Add(IPackable item)
 {
     if (this.capacity - this.boxedTotalWeight >= item.Weight())
     {
         this.itemsInBox.Add(item);
         this.boxedTotalWeight += item.Weight();
     }
 }
Exemple #2
0
 public void Add(IPackable item)
 {
     if (item.Weight() <= this.capacity - weightOfTheBox)
     {
         this.box.Add(item);
         weightOfTheBox += item.Weight();
     }
 }
Exemple #3
0
 public void Add(IPackable item)
 {
     //itemCount = 0;
     if ((item.Weight() + this.boxWeight) <= this.maxCapacity)
     {
         this.boxWeight += item.Weight();
         itemCount++;
     }
 }
Exemple #4
0
 public void Add(IPackable item)
 {
     // System.Console.WriteLine(item.Weight() + " ");
     // System.Console.WriteLine(this.load + " ");
     // System.Console.WriteLine(this.capacity);
     if (item.Weight() + this.load <= this.capacity)
     {
         this.load += item.Weight();
         this.items.Add(item);
     }
 }
Exemple #5
0
 public void Add(IPackable item)
 {
     if (this.Weight() + item.Weight() <= this.tilavuus)
     {
         this.list.Add(item);
     }
 }
Exemple #6
0
 public void Add(IPackable item)
 {
     if (Weight() + item.Weight() <= this.volume)
     {
         list.Add(item);
     }
 }
 public void Add(IPackable item)
 {
     if ((Weight() + item.Weight()) <= this.maxCapacity)
     {
         list.Add(item);
     }
 }
Exemple #8
0
 public void Add(IPackable item)
 {
     if (Weight() + item.Weight() <= this.capacity)
     {
         this.list.Add(item);
     }
 }
Exemple #9
0
 public void Add(IPackable item)
 {
     if ((Weight() + item.Weight()) <= this.capacity)
     {
         items.Add(item);
     }
 }