Determine the letter grade


Discuss the below:

If the user enters 'numbers':

Get input for the grade number in decimal format. i.e. 74.22645 (enter it with 5 decimal places)

Utilize the Math class and round the number to zero decimal places, then use the int cast method to convert to an integer.

Utilize a switch statement to determine the corresponding letter grade.

Output the corresponding letter grade along with the initial number entered in decimal format utilizing the printf method and format specifiers.

Output the number in only 3 decimal places.

If the user enters 'letters':

Get input for the grade letter in String format.

Utilize a switch statement to determine the corresponding output for the letter entered. (ensure you accept both upper and lower case letters.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Determine the letter grade
Reference No:- TGS01935011

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)