DESIGN MODUL 5
PROPERTIES
SOURCE CODE
private void bProsesActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a,b,c,d;
float h,i,j,k,e;
a=Integer.parseInt(eAbsen.getText());
h=a*0.1f;
b=Integer.parseInt(eTugas.getText());
i=b*0.2f;
c=Integer.parseInt(eUts.getText());
j=c*0.3f;
d=Integer.parseInt(eUas.getText());
k=d*0.4f;
e=h+i+j+k;
eAngka.setText(Float.toString(e));
float g;
g=Float.parseFloat(eAngka.getText());
if(g>=80 && g<=100f){
eHuruf.setText("A");
eKeterangan.setText("SANGAT MEMUASKAN");
}else if(g<80f && g>70){
eHuruf.setText("B");
eKeterangan.setText("MEMUASKAN");
}else if(g<70 && g>60f){
eHuruf.setText("C");
eKeterangan.setText("CUKUP");
}else if(g<60 && g>50f){
eHuruf.setText("D");
eKeterangan.setText("KURANG");
}else if(g<50 && g>=0f){
eHuruf.setText("E");
eKeterangan.setText("SANGAT KURANG");
} else {
eHuruf.setText("NILAI YANG ANDA MASUKAN SALAH");
eKeterangan.setText("SILAH KAN COBA LAGI");
}
}
private void bClearActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
eNim.setText("");
eNama.setText("");
eAbsen.setText("");
eTugas.setText("");
eUts.setText("");
eUas.setText("");
eAngka.setText("");
eHuruf.setText("");
eKeterangan.setText("");
eNim.requestFocus();
}
private void bExitActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
}
HASIL PROSES TUGAS MODUL 5
0 komentar:
Posting Komentar