public void Add(IPackable item) { if (this.capacity - this.boxedTotalWeight >= item.Weight()) { this.itemsInBox.Add(item); this.boxedTotalWeight += item.Weight(); } }
public void Add(IPackable item) { if (item.Weight() <= this.capacity - weightOfTheBox) { this.box.Add(item); weightOfTheBox += item.Weight(); } }
public void Add(IPackable item) { //itemCount = 0; if ((item.Weight() + this.boxWeight) <= this.maxCapacity) { this.boxWeight += item.Weight(); itemCount++; } }
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); } }
public void Add(IPackable item) { if (this.Weight() + item.Weight() <= this.tilavuus) { this.list.Add(item); } }
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); } }
public void Add(IPackable item) { if (Weight() + item.Weight() <= this.capacity) { this.list.Add(item); } }
public void Add(IPackable item) { if ((Weight() + item.Weight()) <= this.capacity) { items.Add(item); } }