/* * Adds a book obj to students book list * Assumes max number of books have not been reached */ private void AddToBookCollection(Book book) { if (NumOfBooks < MAX_NUM_OF_BOOKS) { BookCollection.AddLast(book); NumOfBooks++; } }
private void RemoveFromBookCollection(Book book) { try { BookCollection.Remove(book); } catch (Exception e) { Console.WriteLine("Student does not have a book with ID: {0}", book.Id); Console.WriteLine(e.Message); } }