We have study about the Letter Grade Java programming and here is the code below.It is switching java program. If you type the grade and the corresponding character given it will display the student remarks.
import java.util.*; public class LetterGrade{ public static void main (String [] args) String sname,remarks; char lettergrade; Scanner in=new Scanner(System.in){ System.out.println("Enter Student's Name"); sname=in.next(); System.out.printl("Enter LetterGrade"); lettergrade=int.charAt(0); switch (lettergrade){ case 'a': remarks= "outstanding"; break; case 'b': remarks = "v_s"; break; case 'c': remarks = "s"; break; case 'd': remarks = "ni"; break; case 'e': remarks = "failed"; break; default: remarks = "error_entry"; break; } System.out.println("The Student"s Name is" + sname + is + "\n" + "lettergrade" + remarks); } } |