Selasa, 25 April 2017

aplikasi penjualan ice cream

Aplikasi Penjualan Ice Cream


soure code untuk rasa ice cream dan topping
private void RBStrawberryActionPerformed(java.awt.event.ActionEvent evt) {                                            
        // TODO add your handling code here:
        TextRasaIceCream.setText(""+RBStrawberry.getText());
        TextHarga.setText(""+55000);
    }                                           

    private void RBCokelatActionPerformed(java.awt.event.ActionEvent evt) {                                         
        // TODO add your handling code here:
        TextRasaIceCream.setText(""+RBCokelat.getText());
        TextHarga.setText(""+50000);
    }                                        

    private void RBVanilaActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
        TextRasaIceCream.setText(""+RBVanila.getText());
        TextHarga.setText(""+45000);
    }                                       

    private void RBMatchaActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
        TextRasaIceCream.setText(""+RBMatcha.getText());
        TextHarga.setText(""+60000);
    }                                        


private void RBKokoCrunchActionPerformed(java.awt.event.ActionEvent evt) {                                            
        // TODO add your handling code here:
        TextTopping.setText(""+RBKokoCrunch.getText());
        TextHarga2.setText(""+10000);
    }                                           

    private void RBOreoActionPerformed(java.awt.event.ActionEvent evt) {                                      
        // TODO add your handling code here:
        TextTopping.setText(""+RBOreo.getText());
        TextHarga2.setText(""+10000);
    }                             


source code untuk check box diskon
private void CBDiskonActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
        if(CBDiskon.isSelected()){
            int harga=Integer.parseInt(TextHarga.getText());
            int Diskon=harga/10;
            TextDiskon.setText(""+Diskon);
        }else{
            TextDiskon.setText(""+0);
        }
    }          

source code untuk total harga
private void TotalHargaActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
        int bil1=Integer.parseInt(TextHarga.getText());
        int bil2=Integer.parseInt(TextHarga2.getText());
        int bil3=Integer.parseInt(TextDiskon.getText());
        int hasil=bil1+bil2-bil3;
        TextTotalHarga.setText(""+hasil);
    }    

Tidak ada komentar:

Posting Komentar

Database Pemesanan Hotel

07SIFP001 UAS AUDIT TI Rika Oktafiani Rasyid 161011700377 Pada postingan ini saya akan membuat audit database pemesanan hotel meng...