Question: 4. Error Handling & Exceptions: a. Set up an array of four int and load it with four values. Set up code that allows for
4. Error Handling & Exceptions:
a. Set up an array of four int and load it with four values. Set up code that allows for the value of a particular indexs value to be printed to screen (either hard coded or user input) b. Ensure that there is error checking that prevents the user from entering a wrong index value. For example, only values between 0 and 3 should be allowed. c. Now, try to apply Exception Handling on this section of code. d. What is the difference between Exception Handling and Error Checking?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
