Testing dulu gan,…..
Lama ya,….
nie ane ada codingan buat tugas ane yang ke-3
nie ane ada codingan buat tugas ane yang ke-3
Langsung liat ya,……
...
public class gaji_constructor {
public
String Dirut;
public
String Mng;
public
String sv;
public
String kry;
public int
gaji;
public int
laba;
//method
acc & mtt
public
void gaji_pegawai(){
}
public
String getDirut() {
return
Dirut;
}
public
void setDirut(String temp) {
Dirut =
temp;
}
public
String getMng() {
return
Mng;
}
public
void setMng(String temp) {
Mng =
temp;
}
public
String getSv() {
return
sv;
}
public
void setSv(String temp) {
sv =
temp;
}
public
String getKry() {
return
kry;
}
public
void setKry(String temp) {
kry =
temp;
}
public int
getGaji() {
return
gaji;
}
public
void setGaji(int temp) {
gaji =
temp;
}
public int
getLaba() {
return
laba;
}
public
void setLaba(int temp) {
laba =
temp;
}
//overloading
public void print(int gaji, int laba){
System.out.println("Gaji
pegawai = "+laba/100*20);
System.out.println("Laba perusahaan = "+laba);
}
public void print(String temp){
gaji=50000000;
System.out.println("Direktur = "+gaji/100*30+"
"+Dirut);
System.out.println("Manager = "+gaji/100*20+"
"+Mng);
System.out.println("Supervisor = "+gaji/100*10+"
"+sv);
System.out.println("Karyawan = "+gaji/100*5+"
"+kry);
}
}
gag usa banyak penjelasan gan, nie outputnya,……
klo butuh penjelasan, comment aja ntar langsung dijelasin gan,......
moga manfaat,
moga manfaat,
by : surur.syifaus_112
Posted by 09.31 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar