Define an exception class called power failure exception


Question: Define an exception class called Power Failure Exception. The class should have a constructor with no parameters. If an exception is thrown with this zero argument constructor, get Message should return "Power Failure!" The class should also have a constructor with a single parameter of type String. If an exception is thrown with this constructor, then get Message returns the value that was used as an argument to the constructor.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Define an exception class called power failure exception
Reference No:- TGS02404715

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)