UTS ALGORITMA 2 PEMBUATAN APLIKASI TIKET
Deskripsi :
Aplikasi Tiket Bioskop, apliksi ini memudahkan para kasir bioskop untuk mempermudah pembeliian tiket bioskop supaya tidak terjadi penumpukan penonton yang ingin menonton bioskop.
Kompoen Dan Variable :
No Tiket
Jenis Tiket
Jumlah Satuan
Jumlah Beli
Total Bayar
JFrame
Integer
Swing
If
Else
Rumus :
harga satuan * jumlah beli
Flow Chart :
Source Code :
Program_Ticket;
/**
 *
 * @author STMIK
Eresha
 */
public class Frame_penjualan_tiket extends
javax.swing.JFrame {
  /**
     * Creates new
form Frame_penjualan_tiket
     */
    public
Frame_penjualan_tiket() {
       
initComponents();
    }
    /**
     * This method is
called from within the constructor to initialize the form.
     * WARNING: Do NOT
modify this code. The content of this method is always
     * regenerated by
the Form Editor.
     */
   
@SuppressWarnings("unchecked")
    
generatedcode                 
    private void
NoTiketActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add
your handling code here
    }                                       
    private void
RegularActionPerformed(java.awt.event.ActionEvent evt) {                                        
       // TODO add
your handling code here:
       Hargasatuan.setText("50000");
    }                                       
    private void
UltraXDActionPerformed(java.awt.event.ActionEvent evt) {                                                
        // TODO add
your handling code here:
        Hargasatuan.setText("75000");
    }                                               
    private void
UltraXDAtmosAtionPerformed(java.awt.event.ActionEvent evt) {                                       
        // TODO add
your handling code here:
         Hargasatuan.setText("100000");
    }                                      
    private void
GoldActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add
your handling code here:
        
Hargasatuan.setText("150000");
    }                                         
    private void
btnprossesActionPerformed(java.awt.event.ActionEvent evt) {                                           
        // TODO add
your handling code here:
         int c =
Integer.parseInt(Hargasatuan.getText());
         int d =
Integer.parseInt(Jumlahbeli.getText());
         int hasilnya
= c*d;
        
totalbayar.setText("Rp."+hasilnya);
    }                                          
    private void
btnhapusActionPerformed(java.awt.event.ActionEvent evt) {                                         
        // TODO add
your handling code here:
       
NoTiket.setText("");
       
Jumlahbeli.setText("");
       
Hargasatuan.setText("");
       
totalbayar.setText("");
        Regular.setSelected(false);
       
Ultraxdatmos.setSelected(false);
       
Gold.setSelected(false);
       
Regular.setEnabled(true);
       
Ultraxdatmos.setEnabled(true);
       
Gold.setEnabled(true);               
    }                                        
    /**
     * @param args the
command line arguments
     */
    public static void
main(String args[]) {
        /* Set the
Nimbus look and feel */
        look and file
setting code (optional)
        /* Create and
display the form */
        java.awt.EventQueue.invokeLater(new
Runnable() {
            public
void run() {
                new
Frame_penjualan_tiket().setVisible(true);
            }
        });
    }
    // Variables
declaration - do not modify                    
    private javax.swing.JRadioButton
UltraXDAtmos;
    private
javax.swing.JRadioButton Regular;
    private
javax.swing.JRadioButton UltraXD;
    private
javax.swing.JRadioButton Gold;
    private
javax.swing.JTextField Hargasatuan;
    private
javax.swing.JTextField Jumlahbeli;
    private
javax.swing.JTextField NoTiket;
    private
javax.swing.JButton btnhapus;
    private
javax.swing.JButton btnprosses;
    private
javax.swing.JDesktopPane jDesktopPane1;
    private
javax.swing.JLabel jLabel1;
    private javax.swing.JLabel
jLabel2;
    private
javax.swing.JLabel jLabel3;
    private
javax.swing.JLabel jLabel4;
    private
javax.swing.JLabel jLabel5;
    private
javax.swing.JLabel jLabel6;
    private
javax.swing.JLabel jLabel7;
    private
javax.swing.JLabel jLabel8;
    private
javax.swing.JLabel jLabel9;
    private
javax.swing.JTextField totalbayar;
}
Screen Schoot Run :



Komentar
Posting Komentar