Create a Construction Exception class (derived from the C++ Standard Library exception). Embed checks within your constructors

Question:

Create a Construction Exception class (derived from the C++ Standard Library exception). Embed checks within your constructors in a sample class to throw a Construction Exception when necessary. Be sure to enclose all forms of instantiation of this class within the appropriate try and catch block pairings.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer: