Question: A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student,

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

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

Write a class that uses a String array or an ArrayList object to hold the five students’ names, an array of five characters to hold the five students’ letter grades, and five arrays of four doubles each to hold each student’s set of test scores. The class should have methods that return a specific student’s name, the average test score, and a letter grade based on the average. 

Demonstrate the class in a program that allows the user to enter each student’s name and his or her four test scores. It should then display each student’s average test score and letter grade. 

Input Validation: Do not accept test scores less than zero or greater than 100.

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

Step by Step Solution

3.34 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ANSWER public class Student private String name private double testScores public Stud... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Java From Control Structures Questions!