public void ReturnBook(string selection) { Book selectedBook = ValidateBook(selection, CheckedOut); if (selectedBook == null || selectedBook.Available == true) { Console.Clear(); System.Console.WriteLine(@"Invalid Selection"); return; } else { selectedBook.Available = true; AvailableBooks.Add(selectedBook); CheckedOut.Remove(selectedBook); System.Console.WriteLine("Congrats my Dude, Book is back"); } }
public void Return(string selection) { Book selectedBook = ValidateBook(selection, CheckedOut); if (selectedBook == null) { Console.Clear(); System.Console.WriteLine("Invalid Selection"); return; } else { selectedBook.Available = true; CheckedOut.Remove(selectedBook); AvailableBooks.Add(selectedBook); System.Console.WriteLine($"Congratulations on succesfully returning {selectedBook.Title}! We hope you enjoyed the read, and please feel free to check out more!"); } }