Selasa, 09 Mei 2017

Penggunaan JoptionPane di Java

Assalamu’alaikum wr wb,

            Dalam penjelasan projek kali ini sama dengan yang saya jelaskan dalam tugas kemarin. Yaitu program penjualan menggunakan JAVA GUI,untuk menjalankannya program ini user hanya memilih berupa kode barang,kode yang dipilih akan dikalikan dengan jumlah yang akan dibeli.User juga bisa memilih merk barang dan ukuran sepatu yang akan dibeli dengan menggunakan combo box.Jika sudah membeli user bisa langsung keluar dengan memilih button “Keluar” menggunakan Joptionpane.

Contoh Design & Output Run;
























Variable :
    private javax.swing.JComboBox<String> CmbmerkF;
    private javax.swing.JComboBox<String> Cmbsb;
    private javax.swing.JComboBox<String> Cmbukuranf;
    private javax.swing.JComboBox<String> Cmbukurans;
    private javax.swing.JRadioButton RB1;
    private javax.swing.JRadioButton RB2;
    private javax.swing.JRadioButton RB3;
    private javax.swing.JRadioButton RB4;
    private javax.swing.JRadioButton RB5;
    private javax.swing.JButton btnHapus;
    private javax.swing.JButton btnHitung;
    private javax.swing.JComboBox<String> cmbbs;
    private javax.swing.JComboBox<String> cmbjk;
    private javax.swing.JComboBox<String> cmbjt;
    private javax.swing.JTextField hslHarga;
    private javax.swing.JTextField hslJenis;
    private javax.swing.JButton jKnfr;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel16;
    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.JPanel jPanel1;
    private javax.swing.JTextField totalBayar;
    private javax.swing.JTextField txtHasil;
    private javax.swing.JTextField txtJenis;




Contoh SourceCode :
import javax.swing.JOptionPane;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author ASUS-PC
 */
public class TugasUts extends javax.swing.JFrame {
    double jenis, jumlahbarang, tarif;
    String nama;

    /**
     * Creates new form TugasUts
     */
    public TugasUts() {
        initComponents();
    }
private void btnHitungActionPerformed(java.awt.event.ActionEvent evt) {                                         

        jenis = Float.parseFloat(txtJenis.getText());
        jumlahbarang = Float.parseFloat(txtHasil.getText());

        if (jenis == 1) {

            hslJenis.setText("Sepatu Bola");
            hslHarga.setText("Rp. 200000");
           
        } else if (jenis == 2) {

            hslJenis.setText("Sepatu Futsal");
            hslHarga.setText("Rp. 150000");
        } else if (jenis == 3) {

            hslJenis.setText("Jersey Timnas");
            hslHarga.setText("Rp. 95000");
        } else if (jenis == 4) {

            hslJenis.setText("Jersey Klub");
            hslHarga.setText("Rp. 75000");
        } else if (jenis == 5) {

            hslJenis.setText("Bola Sepak");
            hslHarga.setText("Rp. 125000");
        }

        if (jenis == 1) {
            tarif = jumlahbarang * 200000;
            totalBayar.setText("Rp. " + tarif);
        } else if (jenis == 2) {
            tarif = jumlahbarang * 150000;
            totalBayar.setText("Rp. " + tarif);
        } else if (jenis == 3) {
            tarif = jumlahbarang * 95000;
            totalBayar.setText("Rp. " + tarif);
        } else if (jenis == 4) {
            tarif = jumlahbarang * 75000;
            totalBayar.setText("Rp. " + tarif);
        } else if (jenis == 5) {
            tarif = jumlahbarang * 125000;
            totalBayar.setText("Rp. " + tarif);
        }

    }                                        

SourceCode ButtonHapus :   
 private void btnHapusActionPerformed(java.awt.event.ActionEvent evt) {                                        

        txtJenis.setText("");
        txtHasil.setText("");

        hslJenis.setText("");
        hslHarga.setText("");
        totalBayar.setText("");
    }                                    

SourceCode JOptionePane :
private void jKnfrActionPerformed(java.awt.event.ActionEvent evt) {                                     
        // TODO add your handling code here:
      int p =  JOptionPane.showConfirmDialog(null, "Yakin keluar","Konfirmasi",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
   
if(p == 0){
     System.exit(0);
    }
}

SourceCode JRadio :
private void RB1ActionPerformed(java.awt.event.ActionEvent evt) {                                   
        // TODO add your handling code here:
        RB2.setSelected(false);
        RB4.setSelected(false);
        RB3.setSelected(false);
        RB5.setSelected(false);

        txtJenis.setText(RB1.getText());
        txtJenis.setText("1");
    }                                  

    private void RB2ActionPerformed(java.awt.event.ActionEvent evt) {                                   
        // TODO add your handling code here:
        RB1.setSelected(false);
        RB3.setSelected(false);
        RB4.setSelected(false);
        RB5.setSelected(false);

        txtJenis.setText(RB2.getText());
        txtJenis.setText("2");
    }                                  

    private void RB5ActionPerformed(java.awt.event.ActionEvent evt) {                                   
        // TODO add your handling code here:
        RB2.setSelected(false);
        RB4.setSelected(false);
        RB3.setSelected(false);
        RB1.setSelected(false);

        txtJenis.setText(RB5.getText());
        txtJenis.setText("5");

    }                                  

    private void RB3ActionPerformed(java.awt.event.ActionEvent evt) {                                   
        // TODO add your handling code here:
        RB1.setSelected(false);
        RB2.setSelected(false);
        RB4.setSelected(false);
        RB5.setSelected(false);

        txtJenis.setText(RB3.getText());
        txtJenis.setText("3");
    }                                  

    private void RB4ActionPerformed(java.awt.event.ActionEvent evt) {                                   
        // TODO add your handling code here:

        RB1.setSelected(false);
        RB2.setSelected(false);
        RB3.setSelected(false);
        RB5.setSelected(false);

        txtJenis.setText(RB4.getText());
        txtJenis.setText("4");

    }

SourceCode ComboBox:
private void formWindowActivated(java.awt.event.WindowEvent evt) {                                    
        // TODO add your handling code here:
        Cmbsb.addItem("   ");
        Cmbsb.addItem("ADIDAS");
        Cmbsb.addItem("NIKE");
        Cmbsb.addItem("PUMA");
        Cmbsb.addItem("SPECS");
       

       
       
        for(int x=29;x<=43;x++){
            Cmbukurans.addItem(""+x);}
         for(int x=29;x<=43;x++){
            Cmbukuranf.addItem(""+x);}

Senin, 24 April 2017

Program Penjualan java GUI

Assalamu’alaikum wr wb, Dalam penjelasan projek kali ini sama dengan yang saya jelaskan dalam uts kemarin. Yaitu program penjualan menggunakan JAVA GUI,untuk menjalankannya program ini user hanya memilih berupa kode barang,kode yang dipilih akan dikalikan dengan jumlah yang akan dibeli user. Pembahasan : Untuk pengggunaa variablenya ,saya hanya menggunakan satu tipe variable yaitu double lalu ada beberapa method yaitu : jenis,untuk menyimpan jenis barang . barang,untuk menyimpan harga barang . tarif, untuk menyimpan total bayar. Ini screen shotnya:
Ini Source Code nya: public class penjualan extends javax.swing.JFrame { double jenis, barang, tarif; /** * Creates new form penjualan */ public penjualan() { 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") // private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel2 = new javax.swing.JLabel(); RB1 = new javax.swing.JRadioButton(); RB2 = new javax.swing.JRadioButton(); RB3 = new javax.swing.JRadioButton(); RB4 = new javax.swing.JRadioButton(); jLabel3 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); totalBayar = new javax.swing.JTextField(); bh = new javax.swing.JButton(); txtJenis = new javax.swing.JTextField(); txtHasil = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); RB5 = new javax.swing.JRadioButton(); btnHapus = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setText("Toko OlahRaga WAW"); jTextArea1.setColumns(20); jTextArea1.setRows(5); jTextArea1.setText("\tHarga Barang\n1.Sepatu Bola \tRp.200.000\n2.Sepatu Futsal Rp.150.000\n3.Jersey Timnas Rp.95.000\n4.Jersey Klub \tRp.75.000\n5.Bola Sepak\tRp.125000\n"); jScrollPane1.setViewportView(jTextArea1); jLabel2.setText("Daftar Barang:"); RB1.setText("1.Sepatu Bola"); RB1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RB1ActionPerformed(evt); } }); RB2.setText("2.Sepatu Futsal"); RB2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RB2ActionPerformed(evt); } }); RB3.setText("3.Jersey Timnas"); RB3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RB3ActionPerformed(evt); } }); RB4.setText("4.Jersey klub"); RB4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RB4ActionPerformed(evt); } }); jLabel6.setText("Total Bayar:"); totalBayar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { totalBayarActionPerformed(evt); } }); bh.setText("Hitung"); bh.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bhActionPerformed(evt); } }); txtJenis.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtJenisActionPerformed(evt); } }); jLabel7.setText("Kode Barang:"); jLabel8.setText("Jumlah :"); RB5.setText("5.Bola Sepak"); RB5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RB5ActionPerformed(evt); } }); btnHapus.setText("Hapus"); btnHapus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnHapusActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(266, 266, 266)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(RB3) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(RB1) .addComponent(RB2)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(RB5) .addComponent(RB4))))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13)) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(bh) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnHapus)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(totalBayar) .addComponent(txtJenis, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE) .addComponent(txtHasil, javax.swing.GroupLayout.Alignment.TRAILING))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(81, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(22, 22, 22) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(14, 14, 14) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(RB1) .addComponent(RB4) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(RB2) .addComponent(RB5)) .addGap(10, 10, 10) .addComponent(RB3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtJenis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtHasil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(totalBayar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bh) .addComponent(btnHapus)) .addGap(172, 172, 172)))) ); pack(); }// private void txtJenisActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void bhActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: jenis = Float.parseFloat(txtJenis.getText()); barang = Float.parseFloat(txtHasil.getText()); if (jenis == 1) { tarif = barang * 200000; totalBayar.setText("Rp. " + tarif); } else if (jenis == 2) { tarif = barang * 150000; totalBayar.setText("Rp. " + tarif); } else if (jenis == 3) { tarif = barang * 95000; totalBayar.setText("Rp. " + tarif); } else if (jenis == 4) { tarif = barang * 75000; totalBayar.setText("Rp. " + tarif); } else if (jenis == 5) { tarif = barang * 125000; totalBayar.setText("Rp. " + tarif); } } private void totalBayarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void RB4ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: RB1.setSelected(false); RB2.setSelected(false); RB3.setSelected(false); RB5.setSelected(false); txtJenis.setText(RB4.getText()); txtJenis.setText("4"); } private void RB3ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: RB1.setSelected(false); RB2.setSelected(false); RB4.setSelected(false); RB5.setSelected(false); txtJenis.setText(RB3.getText()); txtJenis.setText("3"); } private void RB2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: RB1.setSelected(false); RB3.setSelected(false); RB4.setSelected(false); RB5.setSelected(false); txtJenis.setText(RB2.getText()); txtJenis.setText("2"); } private void RB1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: RB2.setSelected(false); RB4.setSelected(false); RB3.setSelected(false); RB5.setSelected(false); txtJenis.setText(RB1.getText()); txtJenis.setText("1"); } private void RB5ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: RB2.setSelected(false); RB4.setSelected(false); RB3.setSelected(false); RB1.setSelected(false); txtJenis.setText(RB5.getText()); txtJenis.setText("5"); } private void btnHapusActionPerformed(java.awt.event.ActionEvent evt) { txtJenis.setText(""); txtHasil.setText(""); totalBayar.setText(""); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(penjualan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(penjualan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(penjualan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(penjualan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new penjualan().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JRadioButton RB1; private javax.swing.JRadioButton RB2; private javax.swing.JRadioButton RB3; private javax.swing.JRadioButton RB4; private javax.swing.JRadioButton RB5; private javax.swing.JButton bh; private javax.swing.JButton btnHapus; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea jTextArea1; private javax.swing.JTextField totalBayar; private javax.swing.JTextField txtHasil; private javax.swing.JTextField txtJenis; // End of variables declaration }

Selasa, 21 Maret 2017

Program sederhana jadwal mata kuliah java

Assalamualaikum,
Untuk memenuhi salah satu tugas semester ini saya membuat aplikasi jadwal matakuliah, menggunakan bahasa pemograman java.Menggunakan applikasi NetBeans IDE 8.2.

Sedikit penjelasan dari aplikasi saya :
-Disini saya akan menampilkan menu Jadwal matakuliah, dan user akan memasukkan nomor, lalu user diberikan pilihan apakah dia akan melanjutkan memilih atau selesai memilih. Dan jika selesai, program akan menampilkan jadwal mata kuliah.

 

-Tampilan dari program yang saya buat ;




-Tampilan setelah di run jadwal mata kuliah ;



-Flowchart dari program yang saya buat ;


 -Source Code program jadwal mata kuliah ;


=========Source Code Jadwal Mata Kuliah===================
import java.util.Scanner;
public class Jadwal {
   
    /**
     *
     */
    public static void main(String[] argd) {
       Scanner Masuk=new Scanner(System.in);
        //TODO code application logic here  
         int num = 0;
         int Jadwal_MataKuliah;
         String Pilih;
        
         while(num <= 1){
       
         System.out.println("1. Senin");
         System.out.println("2. Selasa");
         System.out.println("3. Rabu");
         System.out.println("4. Kamis");
      
      
        System.out.print("Masukan Nomor = " );
        Jadwal_MataKuliah=Masuk.nextInt () ;
       
         switch(Jadwal_MataKuliah){
            case 1:
                System.out.println("Komputer Dan Masyarakat(SALMAN FARIZY), Komunikasi Data(AFRIZAL ZEIN), Pendidikan Agama(ZAENI MIFTAH)");
                break;
            case 2:
                System.out.println("Lab Algoritma(AGUS SUHARTO) & Pemograman, Algoritma Pemograman II(AGUS SUHARTO)");
                break;
            case 3:
                System.out.println("Kalkulus II(ELFI), Kewarganegaraan(DIAN MEGASARI)");
                break;
            case 4:
                System.out.println("Bahasa Inggris 2(BAMBANG UTOMO)");
                break;
            default:
                System.out.println("Silahkan Pilih 1,2,3,4");
           
        }
       
         System.out.print("Apakah memilih hari lagi ");
         Pilih=Masuk.next();
         switch(Pilih){
             case "y":
             num = 0;
             break;
             default:
             num = 3;
             break;
         }
        
         num++;
        }
    }
}