public void RemoveBook() { Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); errors(ec); }
public void RemoveBook() { Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); // STUDENTS: YOUR ERROR-CHECKING CODE SHOULD GO HERE! }
public void RemoveBook() { Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); if (ec == ErrorCode.BookNotFound) { Console.WriteLine("Book was searched for, but not found. Deletion failed!"); } if (ec == ErrorCode.OK) { Console.WriteLine("Book was successfully removed."); } }
public void RemoveBook() { Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); if (ec == ErrorCode.OK) { Console.WriteLine("removed a book!"); } else { Console.WriteLine("failed to remove a book"); } }
public void RemoveBook() { Console.WriteLine(); //Spacing/aesthetics Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); if (ec == ErrorCode.BookNotFound) { Console.WriteLine("This book is not in the library!"); } else if (ec == ErrorCode.OK) { Console.WriteLine("This book was successfully removed from the library."); } }
public void RemoveBook() { Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); // STUDENTS: YOUR ERROR-CHECKING CODE SHOULD GO HERE! if (ec == ErrorCode.OK) { Console.WriteLine("Book removed!"); } if (ec == ErrorCode.BookNotFound) { Console.WriteLine("Book cannot be found!"); } }
public void RemoveBook() { Console.WriteLine("REMOVE A BOOK!"); Console.WriteLine("Author name?"); string author = Console.ReadLine(); Console.WriteLine("Title?"); string title = Console.ReadLine(); ErrorCode ec = theList.Remove(author, title); //if ec is BookNotFound, print the message to the user //if ec is OK, print the message to the user if (ec == ErrorCode.BookNotFound) { Console.WriteLine("Book is not found!"); } else if (ec == ErrorCode.OK) { Console.WriteLine("Book was removed!"); } }