import javax.swing.*;
public class failornot {
public static void main (String args[]) {
String s1=JOptionPane.showInputDialog("NAME ? ");
int s2=Integer.parseInt(JOptionPane.showInputDialog("H OMEWORKS POıNTS ? "));
int s3=Integer.parseInt(JOptionPane.showInputDialog("M IDTERM POINTS ? "));
int s4=Integer.parseInt(JOptionPane.showInputDialog("F INAL POINTS ? "));
double achieve=0.25*s2+0.35*s3+0.4*s4;
String z=" DEAR "+s1;
if(achieve < 60)
{z+=" YOU FAILED. GAME OVER ";
JOptionPane.showMessageDialog(null,z,JOptionPane.W ARNING_MESSAGE);}
{z+=" CONGRATULATIONS ";
JOptionPane.showMessageDialog(null,z,JOptionPane.P LAIN_MESSAGE);}
}
}