You will be writing a GradeConverter that converts a number grade to a letter grade.
The program will read in a grade, which is an integer between 0 and 100, and then uses a multi-way if statement to determine the corresponding letter grade.
If the grade is 90 or above, the program prints "Your letter grade is A".
Otherwise, if the grade is 80 or above, the program prints "Your letter grade is B".
Otherwise, if the grade is 70 or above, the program prints "Your letter grade is C".
Otherwise, if the grade is 60 or above, the program prints "Your letter grade is D".
Otherwise, (the grade is below 60) the program prints "Your letter grade is F".
This program is a great tool for students, teachers, and administrators alike, as it quickly and accurately provides a letter grade representation of a numeric grade.
Open the class GradeConverter in BlueJ and delete all the text
import java.util.Scanner;
public class GradeConverter
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
// Write your program below this line
}
}
|
Write the program inside the main( ) method.