Question: CM245 Lab 4 (Chapter 12) Submit online through D2L Implement solutions using the appropriate concepts from Chapter 12. There is no need for any UML

CM245 Lab 4 (Chapter 12) Submit online through D2L Implement solutions using the appropriate concepts from Chapter 12. There is no need for any UML for this lab. Provide your implementation (java source code) and the output for each of the tests. There should be one class for exercises 12.2 and 12.3 and two classes for 12.4. I prefer one output file per programming exercise. For each problem you must handle the exception. 12.2 (InputMismatchException) Write a program that prompts the user to read two integers and displays their sum. Your program should prompt the user to read the number again if the input is incorrect 12.3 (ArrayIndexoutOfBounds Exception) Write a program that meets the fol lowing requirements: Creates an array with 100 randomly chosen integers. Prompts the user to enter the index of the array, then displays the corre- sponding element value. If the specified index is out of bounds, display the message Out of Bounds. 12.4 (I1egalArgumentException) Modify the Loan class in Listing 10.2 to throw I11egalArgumentException if the loan amount, interest rate, or number of years is less than or equal to zero. *12.7(NumberFormatException) Write the bin2Dec(String binaryString) method to convert a binary string into a decimal number. Implement the bin2Dec method to throw a NumberFormatException if the string is not a binary string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
