PROGRAM LIST GAJI BULANAN PEGAWAI (JAVA NETBEANS)
*DESKRIPSI (pseudocode)
Disini saya membuat sebuah program list gaji untuk Perusahaan,CV dan Pabrik yang baru berjalan .jadi disini perusahaan tidak usah repot" untuk menulis atau menjumlahkan nya sendiri tinggal memasukan data pegawainya bahkan bila pegawai itu sudah memiliki BPJS diProgram ini perusahaan bisa mengkalkulakisannya,Berikut ini alur jalannya sebuah Program.
Mulai
Masukan Nama
Pilih Jabatan
Jika Jabatan STAFF= Gaji 2500000
Jika Jabatan ADMIN = Gaji 2600000
Jika Jabatan OPERATOR = Gaji 2800000
Jika Jabatan PENGAWAS = Gaji 3000000
Jika Jabatan HRD = Gaji 3500000
Masukan total jam lembur (1jam*10000)
Klik JUMLAH Untuk Melihat Hasil nya
(Rumus =Gaji + lembur)
Bila mana karyawan terkena potongan BPJS,Misalkan (potongan BPJS = 50000)
Klik TOTAL untuk mengetahui hasil keseluruhan yang sudah terkena potongan BPJS
(Rumus = Gaji+Lembur-BPJS)
Klik RESET untuk menghapus atau untuk mencari hasil gaji karyawan yang lain
Klik KELUAR
SELESAI......
*HASIL RUN
Bila terkena potongan BPJS.
*SOURCE CODE PROGRAM
import javax.swing.JOptionPane;
public class List_Gaji extends javax.swing.JFrame {
/**
* Creates new form List_Gaji
*/
public List_Gaji() {
initComponents();
buttonGroup1.add(jRadioButton1);
buttonGroup1.add(jRadioButton2);
buttonGroup1.add(jRadioButton3);
buttonGroup1.add(jRadioButton4);
buttonGroup1.add(jRadioButton5);
}
/**
* 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")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
nama = new javax.swing.JTextField();
gaji = new javax.swing.JTextField();
LEMBUR = new javax.swing.JTextField();
bpjs = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
Hlembur = new javax.swing.JTextField();
jRadioButton1 = new javax.swing.JRadioButton();
jRadioButton2 = new javax.swing.JRadioButton();
jRadioButton3 = new javax.swing.JRadioButton();
jRadioButton4 = new javax.swing.JRadioButton();
jRadioButton5 = new javax.swing.JRadioButton();
jButton5 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel1.setText("LIST GAJI PEGAWAI");
jLabel2.setText("NAMA");
jLabel3.setText("JABATAN");
jLabel4.setText("GAJI");
jLabel5.setText("BPJS");
jLabel6.setText("LEMBUR");
bpjs.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bpjsActionPerformed(evt);
}
});
jButton1.setText("TOTAL");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("RESET");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton3.setText("KELUAR");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton4.setText("HITUNG");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jRadioButton1.setText("STAFF");
jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButton1ActionPerformed(evt);
}
});
jRadioButton2.setText("PENGAWAS");
jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButton2ActionPerformed(evt);
}
});
jRadioButton3.setText("OPERATOR");
jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButton3ActionPerformed(evt);
}
});
jRadioButton4.setText("ADMIN");
jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButton4ActionPerformed(evt);
}
});
jRadioButton5.setText("HRD");
jRadioButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButton5ActionPerformed(evt);
}
});
jButton5.setText("JUMLAH");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(46, 46, 46)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel3))
.addGap(54, 54, 54)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(nama, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jRadioButton1)
.addComponent(jRadioButton3))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jRadioButton4)
.addComponent(jRadioButton2)))
.addComponent(jRadioButton5)))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel6)
.addComponent(jLabel4)
.addComponent(jLabel5))
.addGap(54, 54, 54)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(gaji, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(LEMBUR, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton4)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(Hlembur, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(bpjs, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(33, 33, 33)
.addComponent(jButton5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton3)))))
.addContainerGap(40, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(16, 16, 16)
.addComponent(jLabel1)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(nama, 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(jLabel3)
.addComponent(jRadioButton1)
.addComponent(jRadioButton2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jRadioButton3)
.addComponent(jRadioButton4))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButton5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(gaji, 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(jLabel6)
.addComponent(LEMBUR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton4)
.addComponent(Hlembur, 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(jLabel5)
.addComponent(bpjs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2)
.addComponent(jButton3)
.addComponent(jButton5))
.addGap(27, 27, 27))
);
pack();
}// </editor-fold>
private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
gaji.setText("2500000");
}
private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
gaji.setText("3000000");
}
private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
gaji.setText("2800000");
}
private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
gaji.setText("2600000");
}
private void jRadioButton5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
gaji.setText("3500000");
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int lb = Integer.parseInt(LEMBUR.getText());
int hs = lb*10000;
Hlembur.setText(""+hs);
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String nm = nama.getText();
int gj = Integer.parseInt(gaji.getText());
int lb = Integer.parseInt(Hlembur.getText());
int pt = Integer.parseInt(bpjs.getText());
int total = gj+lb-pt;
JOptionPane.showMessageDialog(null,"TOTAL GAJI :"+total);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
nama.setText("");
gaji.setText("");
LEMBUR.setText("");
Hlembur.setText("");
bpjs.setText("");
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
System.exit(0);
}
private void bpjsActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String nm = nama.getText();
int gj = Integer.parseInt(gaji.getText());
int lb = Integer.parseInt(Hlembur.getText());
int total = gj+lb;
JOptionPane.showMessageDialog(null,"TOTAL GAJI :"+total);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* 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(List_Gaji.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(List_Gaji.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(List_Gaji.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(List_Gaji.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new List_Gaji().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JTextField Hlembur;
private javax.swing.JTextField LEMBUR;
private javax.swing.JTextField bpjs;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JTextField gaji;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
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.JRadioButton jRadioButton1;
private javax.swing.JRadioButton jRadioButton2;
private javax.swing.JRadioButton jRadioButton3;
private javax.swing.JRadioButton jRadioButton4;
private javax.swing.JRadioButton jRadioButton5;
private javax.swing.JTextField nama;
// End of variables declaration
}
Mungkin hanya itu hasil pekerjaan yg bisa saya berikan,kurang dan lebihnya mohon dimaafkan
Thank you.
Terima Kasih.
Hatur Nuhun.
Jumat, 02 November 2018
Tugas UTS Algoritma
Assalamualaikum nama saya Irvan Syahputra dari kelas 01TPLM001 disini saya akan menunjukan hasil kerja UTS saya yaitu mencari hasil luas Belah Ketupat.
Nama : Irvan Syahputra
NIM : 181021400117
Kelas : 01TPLM001
A.Deskripsi Program
import java.util.Scanner;
public class Prog_belahKetupat {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input=new Scanner(System.in);
for(double hitung = 0; hitung <3; hitung++){
System.out.print("Diagonal1 =");
double d1 = input.nextDouble();
System.out.print("Diagonal2 =");
double d2 = input.nextDouble();
double Luas =0.5*(d1*d2);
System.out.println("luas belahKetupat = "+Luas);
}
}
Nama : Irvan Syahputra
NIM : 181021400117
Kelas : 01TPLM001
A.Deskripsi Program
- Mulai
- Deklarasi Variabel : Belah Ketupat
- Input Variabel Diagonal : double d1 = luasbelahketupat.nextDouble();
double d2 = luasbelahketupat.nextDouble(); - Proses mencari Luas : 0.5 *(Diagonal 1 * Diagonal 2)
- Jika Input < 3 Maka Ulangi Langkah Ke 3 : for(int hitung = 0; hitung <3; hitung++){
- Tampilkan Luas : System.out.println("luas belahKetupat = "+Luas);
- Selesai
B. Flowchart
D . Source Code
public class Prog_belahKetupat {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input=new Scanner(System.in);
for(double hitung = 0; hitung <3; hitung++){
System.out.print("Diagonal1 =");
double d1 = input.nextDouble();
System.out.print("Diagonal2 =");
double d2 = input.nextDouble();
double Luas =0.5*(d1*d2);
System.out.println("luas belahKetupat = "+Luas);
}
}
@IRVAN SYAHPUTRA






