Assignment for Chapter 7Use a single subscripted array to solve the following problem. Write a program that reads an unspecified number of test scores (from 0 to 100%) in random order. Your program should display how many scores are above or equal to the average and how many scores are below the average. Do all your calculations in integer form (i.e., truncate the average). Enter a negative number to signify the end of the input. Assume that the maximum number of scores is 10.Your program must do the following:1.When a negative number is entered, or after the 10thvalue is entered, you must: A.make the textField no longer editable (you may do this by calling the textField’s setEditable method)B.display a message in the status bar indicating that no more data can be enteredC.display 3 lines of output:a. The class average is _____b.The # of scores greater than or equal to the average is ____c. The # of scores less than the average is _____2. Error check the data entered verifying that scores do not exceed 100% (displaying an appropriate error message in the status bar).
This is the end of the preview.
access the rest of the document.