Question
USING JAVA YearGradeBook A teacher has 5 students who each will have 4 marking period scores. The teacher uses the following grading scale to assign
USING JAVA
YearGradeBook
A teacher has 5 students who each will have 4 marking period scores. The teacher uses the following grading scale to assign a year end letter grade to a student, based on the average of his or her 4 marking period scores.
Marking Period Score Letter Grade
92-100 A
83-91 B
74-82 C
65-73 D
0-64 F
Write a class that uses a String array or an ArrayList object to hold the students names, an array of five characters to hold the five students letter grades, and five arrays of four doubles each to hold each students set of marking period scores. You may find using a single 5x4 multi-dimensional array easier to manage instead of a separate array for each set of marking period scores.
The class should have methods that return a specific students name, the year end score (average marking period score), and a letter grade based on the average. Although averages are often floating-point values, you should cast the year end score (average marking period score) to an integer when comparing with the grading scale. This reduces the possibility of error. Demonstrate the class in a program that allow the user to enter each students name and his or her four marking period scores. It should then display each students year end score and letter grade.
Input Validation: Do not accept marking period score less than zero or greater than 100.
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