Question: 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

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. Write an exception named InvalidTestScores, which is thrown by the TestScores class if any of the test scores in the array are invalid.
Sample Output:
Invalid score found.
Element: 3 Invalid Score: 101.0
The average of the good scores is 90.24
Press any key to continue . . .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!