Java Grades

Posted : 9 months ago

A teacher has 6 students who have taken 3 tests. The teacher uses the following grading scale to assign a letter grade to
a student, based on the average of his or her 3 test scores.

Test Score Range Letter Grade
90-100 A
80-89 B
70-79 C
60-69 D
0-59 F

Create a class called Grades (java file called with the (exact) following fields and methods (these names
and caps exactly):

Filed/Method Description
Names An array of strings or ArrayList object to hold the 6 students’ names
LetterGrades An array of six characters to hold the six students’ letter grades
Test1Scores An array of doubles to hold each student’s Test 1 scores
Test2Scores An array of doubles to hold each student’s Test 2 scores
Test3Scores An array of doubles to hold each student’s Test 3 scores
EnterData Allow the user to input (in the console) the 6 students’ name, test 1 score, test 2 score, ands test 3
scores. The code should validate the score (only between 0 and 100) and ask again for the wrong values
until the correct value is entered.
GetNames Outputs the student names (one student per line)
GetName Outputs a student’s name, student number given as an argument
GetTestScores Outputs a student’s test scores, student number given as an argument
GetTestScore Outputs a student’s test score, student number given as an argument, targeted test given as the second
GetAverageScore Outputs a student’s test score average (for the 3 tests), student number given as an argument
GetLetterGrades Outputs the students’ letter grades
GetLetterGrade Outputs a student’s letter grades, student number given as an argument
GetClassAverage Outputs the class average: the average of the 6 students’ test score average.
GetTopGrade Outputs the top grade: the maximum/largest test score average from all 6 students.

Demonstrate the class in a program/project called [YourName]-Assignment7 (replace [YourName] with your actual
name) in the same project as the You will need to add the class Grades to the project and add your code to
the project class
main method. The program should allow the user to enter each student’s name and his or her 3 test
scores and store them in a Grades object. The program should use the values from the Grades object to display in a table
format each student’s name, average test score, and letter grade (one row per student), and at the end output the class
average and the top score (using the class methods).
You can lose additional points for not documenting your code, for naming the programs, files, classes, fields, and
methods as requested, not submitting the correct files, cheating, hardcoding the results (i.e. printing out the expected
results instead of computing the values and then outputting the computed values), and using concepts we did not learn
in class yet.
Take screenshots of the editor window (showing the entire source code and the entire output) and paste
them in a Microsoft Word document called
[YourName]-Assignment7-Screenshots.docx. Replace [YourName]
with your actual name. If the entire code or the output does not fit in one screenshot, create multiple
screenshots and add them to the screenshots document.
SUBMIT the [YourName], source files, and the [YourName]-Assignment7-Screenshots
on eCampus under the Assignment 7.

Files Attached

No files attached