Ask Question
31 March, 23:12

Assume that the following code compiles without error in a client of the Book class. What do you know about the Book class? Book book1 = new Book ("Secret Coders", "Gene Luen Yang"); Book book2 = new Book ("Alan Turing: The Enigma", 2014); A. The Book class has one constructor. B. The author name may or may not be needed to construct a Book object. C. Both the book title and publication year are required to construct a Book object

+3
Answers (1)
  1. 31 March, 23:30
    0
    None of the options are correct

    Explanation:

    The book has at least two constructors. The first constructor tells us that the Book class has a constructor to construct a Book object with the book title and author name in the line Book book1 = new Book ("Secret Coders", "Gene Luen Yang");

    The second constructor tells us that the Book class has a constructor to construct a Book object with the book title and publication year in the line Book book2 = new Book ("Alan Turing: The Enigma", 2014);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that the following code compiles without error in a client of the Book class. What do you know about the Book class? Book book1 = ...” in 📗 Engineering if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers