Create program segments that will the user if he wants to accept an evaluation score or an evaluation letter of a faculty. Print the name of the faculty and the remarks obtained. Remarks (rem) are based on the following criteria: (remarks.java)
SCORE/LETTER REMARKS 4.50-5.00 or A Outstanding 4.00-4.49 or B Very Satisfactory 3.50-3.99 or C Satisfactory 3.00-3.49 or D Needs Improvement 2.99 below or E Poor
Kindly help me how to input letter choices to add in if else statement. pardon me i'm just a beginner
as of now this is my program:
Scanner in = new Scanner (System.in);
String n;
float score;
System.out.println("Enter Faculty's Name:");
n=in.nextLine(); //asking the user to incode his/her name
System.out.println("Enter score:");
score=in.nextFloat(); //asking the user to incode score
if ( score >=4.50 )// 4.50 to 5.00
System.out.println("Remark: Outstanding");
else if(score>=4.00)// 4.00 to 4.49
System.out.println("Remark: Very Satisfactory");
else if(score>=3.50)// 3.50 to 3.99
System.out.println("Remark: Satisfactory");
else if(score>=3.00)//3.00 to 3.49
System.out.println("Remark: Needs Improvement");
else
System.out.println("Remark: Poor");
Aucun commentaire:
Enregistrer un commentaire