subject
Computers and Technology, 26.02.2021 20:20 jr294

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 (create a Driver class in the same file).
The program should ask the user to input the number of test scores to be counted,
and then each individual test score. It should then make an array of those scores,
create a TestScore object, and print the average of the scores.

If an IllegalArgumentException is thrown, the main method should catch it, print "Test scores must have a value less than 100 and greater than 0." and terminate the program.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
You picked the corridor which led you here. if the guards find you, they're going to be really angry! what is the synonym of angry
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 24.06.2019 00:10
Read each statement below. if the statement describes a peer-to-peer network, put a p next to it. if the statement describes a server-based network, put an s next to it. p - peer-to-peer s - server-based
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
You know the right answer?
Write a class named TestScores. The class constructor should accept an array of test scores as it...
Questions
question
Mathematics, 05.06.2021 04:40
question
Mathematics, 05.06.2021 04:40
question
Mathematics, 05.06.2021 04:40
question
Mathematics, 05.06.2021 04:40
question
Mathematics, 05.06.2021 04:40
Questions on the website: 13722363