Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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!
        }
Ejemplo n.º 3
0
        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.");
            }
        }
Ejemplo n.º 4
0
        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");
            }
        }
Ejemplo n.º 5
0
        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!");
            }
        }
Ejemplo n.º 7
0
        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!");
            }
        }