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)
{
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 these are true.


c. It must handle all of the possible exceptions thrown by the constructor or have its own throws clause specifying them.

Computer Science & Information Technology

You might also like to view...

When you drag a statement from the clipboard and drop it in the editing area, Alice copies the statement from the ____.

A. object tree B. details area C. clipboard D. events

Computer Science & Information Technology

Capable performance is always judged based on assessment of the performance of a defined set of security practices.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The operating system designed specifically for the Apple's Macintosh computer is ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

The notion of a queue in computer science is the same as the notion of the queues to which you are accustomed in everyday life.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology