subject

Given the following constructor code, which of the statements are true?
public book (string isenofbook, double priceofbook, int numberorderedofbook) if (isbnofbook ) == throw new blankisbn) if (priceofbook < 0) throw new negativeprice (priceofbook) if (numberedorderedofbook < 0) throw neu negativenumberordered(nurberordered v): isbn = 1senof book ; price priceof book; numberedordered = nurtberor dere dofbook;
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.)the calling method must handle the exceptions thrown in the constructor, or have its own throws clause specifying them
d.)all of these

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Suppose an astronomer discovers a large, spherical-shaped body orbiting the sun. the body is composed mostly of rock, and there are no other bodies sharing its orbit. what is the best way to categorize this body? a. planet b. moon c. comet d. asteroid
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
Given the following constructor code, which of the statements are true?
public book (string i...
Questions
question
Physics, 12.10.2019 21:20
Questions on the website: 13722363