Question: 1. TestScores Class Write a class named TestScores. The class constructor should accept an array of test scores as its argument. The class should have
1. 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 You should create a custom message that reads: Invalid Score! Test score needs to be positive and between 0 and 100. If an exception is thrown. In Java code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
