Question: please help me this question. c# language izzes/b664236/take Question 3 11 pts Modify the following program so that When someone calls the SetAtindex method with
izzes/b664236/take Question 3 11 pts Modify the following program so that When someone calls the SetAtindex method with an index that is too large It's out of bounds) the method will generate an OverflowException. You should include a reasonable message in the exception, but you're free to use whatever reasonable message you want. Similarly, if the index provided to SetAtindex is too small, generate an UnderflowException In main, guard all the code with a try/catch block Print out the error message in the catch statement class UnderflonException: Exception public Interflonception(string) boseO) class Overflow caption Exception { public Overflow caption(strings) : baseo ) class SmartArray (intros public SnartArroyo { Fun- new it > public void setAtIndex(int ideint val) your code goes here Punid) - val: # Other methods left out for clarity class Program { static void Main(string args) SmartArrayson SmartArray: 50. SetAtIndex 50, 10). 32 NOTE Because this question is NOT an image you can copy and paste the code from the question (above) into the text box where your answer goes belowl. This way you can fill in the code without having to re-type everything
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
