Given the following constructor code, which of the statements are true?
```
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. There is an error: a throws clause should be added to the constructor header.
b. Classes extending the Exception class should be created for each of the custom exceptions that are thrown in the constructor.
c. A FileNotFoundException will be thrThe calling method must handle the exceptions thrown in the constructor, or have its own throws clause specifying them.
d. All of these are true.
d. All of these are true.
You might also like to view...
What objects are involved in a airplane flight?
What will be an ideal response?
The ____ tool adjusts the black-and-white points in an image.
a. Auto Color b. Auto Contrast c. Auto Tone d. Auto Correction
Which of the following is NOT true about a PivotChart?
A) They can be formatted similar to a regular chart. B) They function independently from the PivotTable. C) They update as the PivotTable updates. D) They can be placed on a separate worksheet.
The foundation of PKI was established approximately 30 years ago with the invention of private key cryptography.
Answer the following statement true (T) or false (F)