|
Exceptions: When Something Goes Wrong Due: Monday, Nov 5, 5:00 PM
Read Section 11.13 (on "checked" and "unchecked" arithmetic). Then, starting with my solution to Assignment 4a, which is in the Solutions folder (i.e. the program that performs exponentiation), do the following:
Note: int.Parse and long.Parse also generate an OverflowException when the input string being parsed is too big to be an int or long, respectively. Write your code so that it distinguishes (by displaying a different error message) between the case that int.Parse or long.Parse throws the exception, and IntegerPower throws the exception (i.e. in one case the input is too big, in the other case the result is too big). |