hi.... how are you guys???
i am programming and we just start taking Java this semester so if anyone could help by checking it, i will be grateful
i was practicing and for some reasons the programme doesn't work completely.... i don't have error syntax...
here is the code:
import javax.swing.*;
import java.lang.String;
public class Grade{
public static void main(String args[]){
int grade=0, cat;
String g, a,b,c,d,e;
cat= grade/10;
g=JOptionPane.showInputDialog("Enter your grade");
grade=Integer.parseInt(g);
switch(cat){
case 1:
JOptionPane.showMessageDialog(null,"Prefect score");
break;
case 2:
JOptionPane.showMessageDialog(null,"well done");
break;
case 3:
JOptionPane.showMessageDialog(null,"Above the averageg");
break;
case 4:
JOptionPane.showMessageDialog(null,"Average");
break;
case 5:
JOptionPane.showMessageDialog(null,"Below the average... Shame on you");
break;
}
}
}