Assume That the Classes BlankISBN,NegativePrice,and NegativeNumberOrdered Are Exception Classes That
Multiple Choice
Assume that the classes BlankISBN,NegativePrice,and NegativeNumberOrdered are exception classes that inherit from Exception.The following code is a constructor for the Book class.What must be true about any method that instantiates the Book class with this constructor? public Book(String ISBNOfBook,double priceOfBook,
Int numberOrderedOfBook) throws BlankISBN,
NegativePrice,
NegativeNumberOrdered
{
If (ISBNOfBook == "")
Throw new BlankISBN() ;
If (priceOfBook < 0)
Throw new NegativePrice(priceOfBook) ;
If (numberedOrderedOfBook < 0)
Throw new NegativeNumberOrdered(numberOrderedv) ;
ISBN = ISBNOfBook;
Price = priceOfBook;
NumberedOrdered = numberOrderedOfBook;
}
A) It must call the constructor with valid data or a compiler error will occur.
B) It must contain an inner class that extends the IOException class.
C) It must handle all of the possible exceptions thrown by the constructor or have its own throws clause specifying them.
D) All of the above.
Correct Answer:

Verified
Correct Answer:
Verified
Q5: What will be the result of the
Q23: If the IOData.dat file does not exist,
Q32: When an exception is thrown by a
Q33: To write data to a binary file
Q36: The throws clause causes an exception to
Q40: When you write a method that throws
Q41: In a try/catch construct, after the catch
Q44: If, within one try statement you want
Q53: An exception's default error message can be
Q55: When the code in a try block