CS-1C Assignment 7 (Exceptions)

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

Using Assignment #6
1. Test the assert macro (both pass and fail). You will
need two different executions.
2. Add exceptions to the Square class.
a. Throw an exception if the length of a side is less
than 0.
b. Throw an exception if the length of a side is
greater than 50 feet.
c. Test both exceptions and output the values that
caused the exceptions (pass a value to the
exception routine)
Following an exception, the program should allow one to
recover from an invalid length (for example, change the
length of the side of the Square to a valid length).
Do not print your Assignment #6 output.
Due March 23rd