Question
Hello, Please help write GradeCalculator program in JAVA which does the following: 1) Prompts the user for 5 test scores as integers greater than or
Hello,
Please help write GradeCalculator program in JAVA which does the following:
1) Prompts the user for 5 test scores as integers greater than or equal to zero and less than or equal to 100.
2) Ensures that the user entries are valid (integers greater than or equal to zero and less than or equal to 100).
3) Stores the 5 tests scores in an array.
4) Uses the bubble sort to sort the scores in ascending order.
5) Calculates the letter grade for each test
6) Displays the letter grade of each score as well as the overall average (the average of the 5 tests).
SPECIFIC REQUIREMENTS (IMPORTANT):
You must include a method called calcAverage to compute the average of the 5 test scores; it takes an array of type int as a parameter and returns the average.
You must include a method called validateUserInput to ensure user entries are integers greater than or equal to zero and less than or equal to 100.
You must include a method called bubbleSort which sorts the values (test scores) stored in the array in ascending order.
You must include a method called displayTestScores which displays each test score and its corresponding letter, as well as the overall average.
You must include a method determineGrade to compute the average of the 5 test scores; it takes an int array with the test scores and a char array to store the corresponding letter grades. The letter grade is arrived at using the table below:
score | Letter Grade |
>=90 | A |
>=80 and | B |
>=70 and | C |
>=60 and | D |
>=0 and | F |
SCREENSHOTS OF PROGRAM FLOW:
Enter score 1
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