public void Checkout(string selection) { Book selectedBook = ValidateBook(selection, AvailableBooks); if (selectedBook == null) { Console.Clear(); System.Console.WriteLine(@"Invalid Selection"); return; } selectedBook.Available = false; AvailableBooks.Remove(selectedBook); CheckedOut.Add(selectedBook); System.Console.WriteLine("Congrats my dude, you go it"); }
public void Checkout(string selection) { Book selectedBook = ValidateBook(selection, AvailableBooks); if (selectedBook == null) { Console.Clear(); System.Console.WriteLine("Invalid Selection"); return; } else { selectedBook.Available = false; CheckedOut.Add(selectedBook); AvailableBooks.Remove(selectedBook); System.Console.WriteLine($"Congratulations on succesfully checking out {selectedBook.Title}! You have 2 weeks from today's date to return it. Enjoy!"); } }