Question
Please look at the output first. I need a JAVA code. Output attached MUST be the same as the sample output!!!!!! Write a class encapsulating
Please look at the output first. I need a JAVA code.
Output attached
MUST be the same as the sample output!!!!!!
Write a class encapsulating the concept of student grades on a test, assuming student grades are composed of a list of integers between 0 and 100. Write the following methods:
1.A constructor with just one parameter, the number of students; all grades can be randomly generated.
2.Accessor, mutator methods
3.A method returning an array of grades sorted in ascending order
4.A method returning the highest grade
5.A method returning the average grade
6.A method returning the median grade (Hint: The median grade will be located in the middle of the sorted array of grades
7.A method returning the mode (the grade that occurs most often). (Hint: Create an array of counters; count how many times each grade occurs; then pick the maximum in the array of counters; the array index is the mode. Write a client class to test all of the methods in your class
Problems Javadoc Declaration Console xterminated> Grad Java Applicationl CAProgram Files Navayret g1. Grades: 14 36 25 93 71 30 88 100 93 5 92 g22 52 61 86 35 62 73 14 71 66 82 47 Objects are not equal Setting gl and g arrays to studentGrades Grades: 56 97 85 78 97 88 98 97 62 75 75 comparing gl and g2 for equality objects are equal Sorted grades: 56 62 75 75 78 85 88 97 97 97 98 The highest grade is 98 The average grade is 82.55 The median grade is 85 The mode is 97Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started