Guest User

Untitled

a guest
Jul 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. public class Staff extends Karyawan {
  2. private int lembur;
  3. private double gajiLembur;
  4.  
  5. public void setLembur(int lembur)
  6. {
  7. this.lembur=lembur;
  8. }
  9. public int getLembur()
  10. {
  11. return lembur;
  12. }
  13. public void setGajiLembur(double gajiLembur)
  14. {
  15. this.gajiLembur=gajiLembur;
  16. }
  17. public double getGajiLembur()
  18. {
  19. return gajiLembur;
  20. }
  21. public double getGaji(int lembur,double gajiLembur)
  22. {
  23. return super.getGaji()+lembur*gajiLembur;
  24. }
  25. public double getGaji()
  26. {
  27. return super.getGaji()+lembur*gajiLembur;
  28. }
  29. public void lihatInfo()
  30. {
  31. System.out.println("NIP :"+this.getNip());
  32. System.out.println("Nama :"+this.getNama());
  33. System.out.println("Golongan :"+this.getGolongan());
  34. System.out.println("Jml Lembur :"+this.getLembur());
  35. System.out.printf("Gaji Lembur :%.0f\n", this.getGajiLembur());
  36. System.out.printf("Gaji :%.0f\n",this.getGaji());
  37. }
  38. }
Add Comment
Please, Sign In to add comment