Sale!

CS-1C Assignment 7 (Exceptions) solved

Original price was: $35.00.Current price is: $28.00. $23.80

Category:

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