PENENTUAN GAJI BERDASARKAN GOLONGAN
Buat Aplikasi penentuan Gaji Karyawan berdasarkan golongan A, B, C
Ketentuan :
1. User Menginput data karyawan (nama, nik, bagian)
2. User Menginput golongan karyawan (A/B/C)
3. User Menginput jumlah hari masuk
4. System menampilkan -->
- Data Karyawan
- Gaji Pokok
- Tunjangan Transportasi
- Potongan Asuransi
- Total Gaji
Gaji Pokok:
Jika Golongan A:
Gaji Pokok = 3000000
Potongan Asuransi = 5% dari gaji pokok
Uang transport per hari = 25000
tunjangan transport = jml Hari masuk * uang transport per hari
Jika Golongan B:
Gaji Pokok = 2500000
Potongan Asuransi = 3% dari gaji pokok
Uang transport per hari = 25000
Jika Golongan C:
Gaji Pokok = 2000000
Uang transport per hari = 25000
tunjangan transport = jml Hari masuk * uang transport per hari
Total Gaji = gaji pokok + tunjangan tranport
--------------------------------------------------------------------------------------------------------------------------
Flowchart Penentuan Gaji Karyawan Berdasarkan Golongan :
--------------------------------------------------------------------------------------------------------------------------
/*
* 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.
*/
package gajikaryawan21;
import java.util.Scanner;
/**
*
* @author ilham
*/
public class GajiKaryawan21 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int gajipokok;
int gapok;
int uangtransportperhari;
int tuntran;
int jmlharimasuk;
int pilgol;
int potasu;
int toga;
String nama,nik,bagian;
Scanner bacaData = new Scanner(System.in);
System.out.println(" PENENTUAN GAJI KARYAWAN BERDASARKAN GOLONGAN ");
System.out.println("..............................................");
System.out.println("[1]Golongan A\n Gaji Pokok = Rp.3.000.000 \n Potongan Asuransi = 5% \n[2]Golongan B\n Gaji Pokok = Rp.2.500.000 \n Potongan Asuransi = 3% \n[3]Golongan C\n Gaji Pokok = Rp.2.000.000 \n");
System.out.println("==============================================");
System.out.print("Nama Karyawan : ");
nama = bacaData.nextLine();
System.out.print("Nik Karyawan : ");
nik = bacaData.nextLine();
System.out.print("Posisi Karyawan : ");
bagian = bacaData.nextLine();
System.out.print("Jumlah Hari Masuk : ");
jmlharimasuk = bacaData.nextInt();
System.out.print("Pilih Golongan : ");
pilgol = bacaData.nextInt();
System.out.println("----------------------------------------------");
System.out.println("Nama Karyawan : " + nama);
System.out.println("Nik Karyawan : " + nik);
System.out.println("Posisi Karyawan : " + bagian);
uangtransportperhari = 25000;
tuntran = jmlharimasuk * uangtransportperhari;
System.out.println("Tunjangan Transport : " + tuntran);
switch (pilgol){
case 1:
gapok = 3000000;
potasu = 3000000*5/100;
gajipokok = gapok - potasu;
toga = gajipokok + tuntran;
System.out.println("Gaji Pokok : " + gajipokok);
System.out.println("Potongan Asuransi : " + potasu);
System.out.println("----------------------------------------------");
System.out.println("Total Gaji : " + toga);
System.out.println("==============================================");
break;
case 2:
gapok = 2500000;
potasu = 2500000*3/100;
gajipokok = gapok - potasu;
toga = gajipokok + tuntran;
System.out.println("Gaji Pokok : " + gajipokok);
System.out.println("Potongan Asuransi : " + potasu);
System.out.println("----------------------------------------------");
System.out.println("Total Gaji : " + toga);
System.out.println("==============================================");
break;
case 3:
gajipokok = 2000000;
toga = gajipokok + tuntran;
System.out.println("Gaji Pokok : " + gajipokok);
System.out.println("----------------------------------------------");
System.out.println("Total Gaji : " + toga);
System.out.println("==============================================");
break;
default:
System.out.println(" 'PILIHAN OPERASI TIDAK SESUAI !!' ");
}
}
}
--------------------------------------------------------------------------------------------------------------------------
[1] Golongan A
[2] Golongan B
[3] Golongan C
see you next time
--------------------------------------------------------------------------------------------------------------------------
Ketentuan :
1. User Menginput data karyawan (nama, nik, bagian)
2. User Menginput golongan karyawan (A/B/C)
3. User Menginput jumlah hari masuk
4. System menampilkan -->
- Data Karyawan
- Gaji Pokok
- Tunjangan Transportasi
- Potongan Asuransi
- Total Gaji
Gaji Pokok:
Jika Golongan A:
Gaji Pokok = 3000000
Potongan Asuransi = 5% dari gaji pokok
Uang transport per hari = 25000
tunjangan transport = jml Hari masuk * uang transport per hari
Jika Golongan B:
Gaji Pokok = 2500000
Potongan Asuransi = 3% dari gaji pokok
Uang transport per hari = 25000
Jika Golongan C:
Gaji Pokok = 2000000
Uang transport per hari = 25000
tunjangan transport = jml Hari masuk * uang transport per hari
Total Gaji = gaji pokok + tunjangan tranport
--------------------------------------------------------------------------------------------------------------------------
Flowchart Penentuan Gaji Karyawan Berdasarkan Golongan :
--------------------------------------------------------------------------------------------------------------------------
/*
* 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.
*/
package gajikaryawan21;
import java.util.Scanner;
/**
*
* @author ilham
*/
public class GajiKaryawan21 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int gajipokok;
int gapok;
int uangtransportperhari;
int tuntran;
int jmlharimasuk;
int pilgol;
int potasu;
int toga;
String nama,nik,bagian;
Scanner bacaData = new Scanner(System.in);
System.out.println(" PENENTUAN GAJI KARYAWAN BERDASARKAN GOLONGAN ");
System.out.println("..............................................");
System.out.println("[1]Golongan A\n Gaji Pokok = Rp.3.000.000 \n Potongan Asuransi = 5% \n[2]Golongan B\n Gaji Pokok = Rp.2.500.000 \n Potongan Asuransi = 3% \n[3]Golongan C\n Gaji Pokok = Rp.2.000.000 \n");
System.out.println("==============================================");
System.out.print("Nama Karyawan : ");
nama = bacaData.nextLine();
System.out.print("Nik Karyawan : ");
nik = bacaData.nextLine();
System.out.print("Posisi Karyawan : ");
bagian = bacaData.nextLine();
System.out.print("Jumlah Hari Masuk : ");
jmlharimasuk = bacaData.nextInt();
System.out.print("Pilih Golongan : ");
pilgol = bacaData.nextInt();
System.out.println("----------------------------------------------");
System.out.println("Nama Karyawan : " + nama);
System.out.println("Nik Karyawan : " + nik);
System.out.println("Posisi Karyawan : " + bagian);
uangtransportperhari = 25000;
tuntran = jmlharimasuk * uangtransportperhari;
System.out.println("Tunjangan Transport : " + tuntran);
switch (pilgol){
case 1:
gapok = 3000000;
potasu = 3000000*5/100;
gajipokok = gapok - potasu;
toga = gajipokok + tuntran;
System.out.println("Gaji Pokok : " + gajipokok);
System.out.println("Potongan Asuransi : " + potasu);
System.out.println("----------------------------------------------");
System.out.println("Total Gaji : " + toga);
System.out.println("==============================================");
break;
case 2:
gapok = 2500000;
potasu = 2500000*3/100;
gajipokok = gapok - potasu;
toga = gajipokok + tuntran;
System.out.println("Gaji Pokok : " + gajipokok);
System.out.println("Potongan Asuransi : " + potasu);
System.out.println("----------------------------------------------");
System.out.println("Total Gaji : " + toga);
System.out.println("==============================================");
break;
case 3:
gajipokok = 2000000;
toga = gajipokok + tuntran;
System.out.println("Gaji Pokok : " + gajipokok);
System.out.println("----------------------------------------------");
System.out.println("Total Gaji : " + toga);
System.out.println("==============================================");
break;
default:
System.out.println(" 'PILIHAN OPERASI TIDAK SESUAI !!' ");
}
}
}
--------------------------------------------------------------------------------------------------------------------------
[2] Golongan B
[3] Golongan C
see you next time
--------------------------------------------------------------------------------------------------------------------------
Comments
Post a Comment