ASSIGNMENT 7

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.

TestScoreRange 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 Grades.java) with the (exact) following fields and methods (these

names and caps exactly):

Filed/Method Description

Names

LetterGrades

Test1Scores

Test2Scores

Test3Scores

EnterData

GetNames

GetName

GetTestScores

GetTestScore

GetAverageScore

GetLetterGrades

GetLetterGrade

An array if strings or ArrayList object to hold the 6 students’ names

Aan array of six characters to hold the six students’ letter grades

An array of doubles to hold each student’s Test 1 scores

An array of doubles to hold each student’s Test 2 scores

An array of doubles to hold each student’s Test 3 scores

Allow the user to enter (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.

Returns the student names (one student per line)

Returns a student’s name, student number given as an argument

Returns a student’s test scores, student number given as an argument

Returns a student’s test score, student number given as an argument, targeted test

given as the second argument

Returns a student’s test score average (for the 3 tests), student number given as an

argument

Returns a student’s letter grades

Returns a student’s letter grades, student number given as an argument

 

GetClassAverage Returns the class average: the average of the 6 students’ test score average. 

    • 10 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      grades.zip