Question: Java coding part 1 and 2. Please and thank you! SECTION 3. Write alass named Grade that will read in 1 to n scores from
Java coding part 1 and 2. Please and thank you! SECTION 3. Write alass named Grade that will read in 1 to n scores from the file grades. txt downloaded from D2L calculates the letter grade of each score, and average of the valid scores and the letter grade of the average of the scores. Only valid scores shoukd be used with an appropriate error message for the scores that are not valid. This errer check should be handled right after reading the value. As part of this lab implement the two methods below static String letterGrade(double score) returns the letter grade of the average of the scores where the scale is defined as: static boolean validscore(double score) returns true if score is in range o..100, otherwise returns false Sample input 100 101 90 89 80 79 -82 70 69 60 59 0 8 Sample output 100 A B0 D 70 C 69 Average: 71.27, Letter Grade: End of Progran Algorithm: Grade Calculator open scores file print progras heading print coluen headings while (IEOF) do: if (validscore(score) do: gradeletterGrade(score) print score, grade count totalScores totalscoresscore else print score, invalid score error sessage end-if end-while avg -totalScores/count ab9 Page 2 of 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
