Sabtu, 13 April 2013

Program Menu Kasir NetBeans Project

Note Gambar di atas :

Button Nasi Change Variable Name : NasiB
Button Soup Change Variable Name : SoupB
Button Es Change Variable Name : EsB

Checkbox Ayam/Ikan Change Variable Name : AyamCB
Checkbox Daging Change Variable Name : DagingCB
Checkbox Teh/Jeruk Change Variable Name : TehCB

TexField1 Change Variable Name : PilihanTF

TextField2 Change Variable Name : HargaTF
TextField3 Change Variable Name : PorsiTF

Button Hitung Change Variable Name : HitungB

TextFiled4 Change Variable Name : HasilTF


Text Program:
Button Nasi tuliskan program berikut:
if((AyamCB.isSelected()) && (DagingCB.isSelected())){
            PilihanTF.setText("Nasi Ayam dan Nasi Daging");
            HargaTF.setText("22000");
        }
        else if(AyamCB.isSelected()){
            PilihanTF.setText("Nasi Ayam");
            HargaTF.setText("12000");
        }
        else if(DagingCB.isSelected()){
            PilihanTF.setText("Nasi Daging");
            HargaTF.setText("15000");
        }
        else{
            PilihanTF.setText("Nasi Ikan");
            HargaTF.setText("11000");
        }









Button Es tuliskan program berikut:
 if(TehCB.isSelected()){
            PilihanTF.setText("Es Teh");
            HargaTF.setText("2000");
        }
        else{
            PilihanTF.setText("Es Jeruk");
            HargaTF.setText("3000");
        }



Button Hitung tuliskan program berikut:
double hasil = Double.parseDouble(HargaTF.getText()) * Double.parseDouble(PorsiTF.getText());
        HasilTF.setText("Rp "+hasil);


Selamat Mencoba Semoga Sukses.

Leave a Reply

 
 

Apakah anda bisa bermain dota 2?