Home | Looking for something? Sign In | New here? Sign Up | Log out

Sabtu, 29 Mei 2010

Midtest Java

Sabtu, 29 Mei 2010
import javax.swing.*;
public class midtest
{
public static void main (String[]args)
{
String Pil="";
String hasil ="";
String input = "";
String input2 = "";
String input3 = "";
String input4 = "";
String pil2="";
String pil3="";
String kls ="";

int Menu=0;
int menu2=0;
int menu3=0;
int nm = 0;
int jr = 0;
int an =0;
int tg =0;
int md=0;
int fn=0;
int qs=0;
double ipk=0;



Pil = JOptionPane.showInputDialog ("STMIK HANDAYANI MAKASSAR : "+
"\n==============================="+"\n1. DATA MAHASISWA"+" \n2. PREDIKAT KELULUSAN");

Menu = Integer.parseInt (Pil);
switch (Menu)

{
case 1:
input = JOptionPane.showInputDialog ("DATA MAHASISWA"+"\nNama Mahasiswa : ");
hasil +="\nNama Mahasiswa = " +(input);
pil2 = JOptionPane.showInputDialog ("Kode Jurusan : "+
"\n1. = 001"+" \n2. = 002"+" \n3. = 003"+" \n4. = 004");
menu2= Integer.parseInt (pil2);
switch (menu2)
{
case 1:
hasil +="\nJurusan = Teknik Informatika";
hasil +="\nSPP = "+(800000);
hasil +="\nBPP = "+(1200000);
hasil +="\nTotal Biaya = "+(800000+1200000);
break;
case 2:
hasil +="\nJurusan = Sistem Komputer";
hasil +="\nSPP = "+(700000);
hasil +="\nBPP = "+(1250000);
hasil +="\nTotal Biaya = "+(700000+1250000);
break;
case 3:
hasil +="\nJurusan = Manajemen Informatika";
hasil +="\nSPP = "+(600000);
hasil +="\nBPP = "+(1100000);
hasil +="\nTotal Biaya = "+(600000+1100000);
break;
case 4:
hasil +="\nJurusan = Komputerisasi Akuntansi";
hasil +="\nSPP = "+(550000);
hasil +="\nBPP = "+(1000000);
hasil +="\nTotal Biaya = "+(550000+1000000);
break;
default:
hasil = "Maaf,, Angka Yang Ada Input Tidak Ada Dalam Pilihan !!!";
}
break ;

case 2:
input = JOptionPane.showInputDialog ("PREDIKAT KELULUSAN"+"\nMasukkan Nama Mahasiswa : ");
hasil +="\nNama Mahasiswa = " +(input);
input2 = JOptionPane.showInputDialog ("Masukkan IPK Anda : ");
ipk=Double.parseDouble(input2);
hasil +="\nIPK Anda = " +Double.toString(ipk);
if (ipk>=3.50 )
hasil +="\nPredikat Kelulusan Pujian";
else if((ipk<3.50)&&(ipk>=3.00))
hasil +="\nPredikat Kelulusan Sangat Memuaskan";
else if((ipk<3.00)&&(ipk>=2.50))
hasil +="\nPredikat Kelulusan Memuaskan";
else if((ipk<2.50)&&(ipk>=2.00))
hasil +="\nPredikat Kelulusan Cukup Memuaskan";
else
hasil +="\nPredikat GAGAL!!!";
break;

default:
hasil = "Maaf,, Angka Yang Ada Input Tidak Ada Dalam Pilihan !!!";
}
JOptionPane.showMessageDialog (null, hasil);
System.exit(0);
}
}

0 komentar:

:10 :11 :12 :13
:14 :15 :16 :17
:18 :19 :20 :21
:22 :23 :24 :25
:26 :27 :28 :29
:30 :31 :32 :33
:34 :35 :36 :37
:38 :39 :40 :41
:42 :43 :44 :45

Posting Komentar