Create a program that will accept the evaluation score of a faculty and determine its equivalent remarks. Print the name of the faculty and the remarks obtained. Remarks are based on the following criteria:
Score Remarks
4.50 – 5.00 Outstanding
4.00 – 4.49 Very Satisfactory
3.50 – 3.99 Satisfactory
3.00 – 3.49 Poor
2.99 below Out-of-Range
import java.util.Scanner;
public class App {
/**
* The start point of the program
*
* @param args
*
*/
public static void main(String[] args) {
Scanner keyBoard = new Scanner(System.in);
System.out.print("Input faculty: ");
String faculty = keyBoard.nextLine();
System.out.print("Input score: ");
double score = keyBoard.nextDouble();
System.out.println("Faculty is : " + faculty);
// 4.50 – 5.00 Outstanding
if (score >= 4.5 && score <= 5.00) {
System.out.println("The remark is: Outstanding");
}
// 4.00 – 4.49 Very Satisfactory
else if (score >= 4.00 && score <= 4.49) {
System.out.println("The remark is: Very Satisfactory");
}
// 3.50 – 3.99 Satisfactory
else if (score >= 3.50 && score <= 3.99) {
System.out.println("The remark is: Satisfactory");
}
// 3.00 – 3.49 Poor
else if (score >= 3.00 && score <= 3.49) {
System.out.println("The remark is: Poor");
} else {
// 2.99 below Out-of-Range
System.out.println("The remark is: Out-of-Range");
}
keyBoard.close();
}
}
Comments
Leave a comment