Question: Write a method called getGrade that accepts an integer representing a students grade in a course and returns that students numerical course grade. The grade

Write a method called getGrade that accepts an integer representing a student’s grade in a course and returns that student’s numerical course grade. The grade can be between 0.0 (failing) and 4.0 (perfect). Assume that scores are in the range of 0 to 100 and that grades are based on the following scale:

For an added challenge, make your method throw an IllegalArgumentException if the user passes a grade lower than 0 or higher than 100.

Step by Step Solution

3.37 Rating (175 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public static double getGrade int s... 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 Building Java Programs A Back to Basics Approach Questions!