Page 1 of 1

Write a program, “GradeSort”. The program will create an array of type integer that holds 40 numbers between 50 and 100.

Posted: Mon Mar 21, 2022 4:42 pm
by answerhappygod
Write a program, “GradeSort”. The program will create an array
of type integer that holds 40 numbers between 50 and 100. The
integers have to be created randomly. Use the title, “Student
Grades”. Print the list in a 8 rows by 5 columns format. Then sort
the list in descending order, (big to small), using Selection Sort.
Print the new list using the title, “Student Grades in descending
order”, in the same format as the unsorted list. After the list is
sorted search for the following:
Sample output:
*** Student Grades ***
57 81 54 71
96
61 72 96 56 65

97 62 93 62 85

58 86 98 99 98

66 59 59 68 53

63 63 58 100 83

82 95 92 98 77

92 68 75 64 94
*** Student Grades in Descending Order ***
100 99 98 98
98
97 96 96 95 94

93 92 92 86 85

83 82 81 77 75

72 71 68 68 66

65 64 63 63 62

62 61 59 59 58

58 57 56 54
53
The average grade: 76
Number of Students that have the average grade: 0
Number of Students that have above average grade: 19
Number of Students that have below average grade: 21
The highest grade: 100
The lowest grade: 53
Java