Question
JAVA Program: Write a program that reads student scores, gets the best score and then assigns grades based on the following scheme: Grade is A
JAVA Program:
Write a program that reads student scores, gets the best score and then assigns grades based on the following scheme:
Grade is A if score is >= best 10
Grade is B if score is >= best 20
Grade is C if the score is >= best 30
Grade is D if score >= best 40
Grade is F otherwise
Here are the required steps that must be taken:
1. Ask the user the number of the students
2. Declare an array with the given size
3. Store the grades in the array
4. Fine the maximum grade in the array
5. Output the result
Here is the list of the required methods:
1. fillArray that fills the array with the students grades. You must pass an array as the parameter
2. findMaxGrade, returns the max grade in the array. Gets the array of the grade as the parameter
3. output that displays the result. This method gets the max score and the array of scores as its parameter.
4. Main , in this method you ask the user if she/he wants to repeat using the program.
Here is sample output:
Enter the number of the students: 4
Enter 4 scores: 40 55 70 58
Here is the result:
Student Score Grade
1 40 C
2 55 B
3 70 A
4 58 B
Step 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