Create a Java program to: Ask the user to input score for 10 students. If it is an invalid value (i.e. less than 0 or greater than 100), keep asking the user to re-input for this student. a. Create an...


Create a Java program to:


Ask the user to input score for 10 students. If it is an invalid value (i.e. less than 0 or greater than 100), keep asking the user to re-input for this student.


a. Create an array to store the scores.


b. Use a regular condition in the while loop, or using infinite while loop and break statement to achieve the same goal (the latter implementation might be more concise).


c. Print all the scores, one at each line.


Test case: You can use smaller array (say size 3) to test the program first by defining a constant variable for the total number of students and change it to 10 in the end.


Here are two possible test cases of input and output for a size 3 array:


(1) Input: 87, 105, 104, 100, -45, 58


Output: 8710058


(2) Input: 200, 300, 400, 90,0, -60, -40, 70


Output:90070



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here