Question: Java Write a class called Grades. Grades must have a main method (see example of what the main method does below). Grades are values between

Java Write a class called Grades. Grades must have a main method (see example of what the main method does below). Grades are values between zero and 10 (both zero and 10 included), and are always rounded to the nearest half point (i.e. ALL GRADES entered in the system end in either .0 or .5). To translate grades to letters: 8.5 to 10.0 become an "A," 7.5 and 8.0 become a "B," 6.5 and 7.0 become a "C," 5.5 and 6.0 become a "D," and 0.0 to 5.0 become an "F." Anything else is an error. Implement a program such that, it asks the user for a grade, and then it prints the corresponding letter. If the user enters a grade lower than zero or higher than 10, print an error message (as in example below). ALL GRADES MUST END IN EITHER .0 or .5, including 10.0 and 0.0. 

examples:

(program must give the messages below)

% java Grades

enter a number grade: 8.0

letter grade is B

% java Grades

enter a number grade: 13.0

Error: 13.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!