public void SafePrintBookInformation(Book aBook)
 {
     if (aBook == null) {
         Console.WriteLine("Book was null...");
     } else {
         Console.WriteLine(aBook.GetAllInformation());
     }
 }
        public void Run()
        {
            Book b1 = new Book("AD1337", "Java for All", "John Potter", 352);
            Book b2 = new Book("XS3220", "Gardening", "Alex Sohn", 220);
            Book b3 = new Book("DD0095", "Cars in the USA", "Susan Dreyer", 528);
            Book b4 = new Book("PT1295", "Copenhagen Dawn", "Dan Mygind", 104);

            BookCatalogSolution theCatalog = new BookCatalogSolution();
            theCatalog.AddBook(b1);
            theCatalog.AddBook(b2);
            theCatalog.AddBook(b3);
            theCatalog.AddBook(b4);

            Console.WriteLine("------------- Printing all books ---------------");
            theCatalog.PrintAllBooks();
            Console.WriteLine("------------------------------------------------");
            Console.WriteLine();

            SafePrintBookInformation(theCatalog.LookupBook("AD1337"));
            SafePrintBookInformation(theCatalog.LookupBook("AD1338"));
            SafePrintBookInformation(theCatalog.LookupBook("PT1295"));
            SafePrintBookInformation(theCatalog.LookupBook("......"));
            SafePrintBookInformation(theCatalog.LookupBook("ad1337"));
        }
 public void AddBook(Book aBook)
 {
     // Add the given Book object to the List
     books.Add(aBook);
 }
 public void AddBook(Book aBook)
 {
     // Add code that can add the given Book object to the list
 }