Created
January 12, 2011 10:22
-
-
Save sakti/775979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Manager extends Karyawan { | |
private double tunjangan; | |
private String bagian; | |
private Staff st[]; | |
public void setTunjangan(double tunjangan) | |
{ | |
this.tunjangan=tunjangan; | |
} | |
public double getTunjangan() | |
{ | |
return tunjangan; | |
} | |
public void setBagian(String bagian) | |
{ | |
this.bagian=bagian; | |
} | |
public String getBagian() | |
{ | |
return bagian; | |
} | |
public void setStaff(Staff st[]) | |
{ | |
this.st=st; | |
} | |
public void viewStaff() | |
{ | |
int i; | |
System.out.println("--------------------"); | |
for(i=0;i<st.length;i++) | |
{ | |
st[i].lihatInfo(); | |
} | |
System.out.println("--------------------"); | |
} | |
public void lihatInfo() | |
{ | |
System.out.println("Manager :"+this.getBagian()); | |
System.out.println("NIP :"+this.getNip()); | |
System.out.println("Nama :"+this.getNama()); | |
System.out.println("Golongan :"+this.getGolongan()); | |
System.out.printf("Tunjangan :%.0f\n",this.getTunjangan()); | |
System.out.printf("Gaji :%.0f\n",this.getGaji()); | |
System.out.println("Bagian :"+this.getBagian()); | |
this.viewStaff(); | |
} | |
public double getGaji() | |
{ | |
return super.getGaji()+tunjangan; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment