Question: Below is the output for the above program. Please note the following requirements: 1. This program should not exit on an invalid test score. It

Below is the output for the above program. Please note the following requirements:
1. This program should not exit on an invalid test score. It should simply display an error message, and move on to the next test score. 2. You do not have to ask for user input for the test scores; you can just hard code them in. At least 6 test scores but no more than 10.
This program is more tricky than it sounds. Two observations should help you: 1. Put your try/catch construct in a loop 2. There is a keyword that allows you to skip the current iteration of the loop and continue to the next. It will be very useful in this case.

Please write in Java
TestScores Class Write a class named Testscores. The class constructor should accept an array of test scores as its argument. The class should have a method that returns the average of the test scores. If any test score in the array is negative or greater than 100 , the class should throw an IllegalArgumentException. Demonstrate the class in a program. Test 1:89 Test 2:101 Test 3:64 Test 4:1 Test 5:89 Test 6:99 89 is being processed... Test score 101 is invalid 64 is being processed... Test score -1 is invalid 89 is being processed... 99 is being processed... The average of the tests entered is 85.3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
