public bool addBook(Book b) { if(b.getWeight() + weight > weightLimit) { return false; } else { books.Add(b); weight += b.getWeight(); return true; } }
public bool addBook(Book b) { if(b.getWeight() + weight > weightLimit) { return false; } else { books.Add(b); weight += b.getWeight(); return true; } }