Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.02 KB | None | 0 0
  1. import os
  2.  
  3. class Pegawai(object):
  4.     def __init__(self, nama, nip, alamat):
  5.         self.nama = nama
  6.         self.nip = nip
  7.         self.alamat = alamat
  8.     def staf(self, jumlahKehadiran, tarifHarian):
  9.         self.jumlahKehadiran = jumlahKehadiran
  10.         self.tarifHarian = tarifHarian
  11.        
  12.     def dosen(self, jumlahSKS, tarifSKS):
  13.         self.jumlahSKS = jumlahSKS
  14.         self.tarifSKS = tarifSKS
  15.        
  16.     def tampilkan(self):
  17.         print("Nama\t: ", self.nama)
  18.         print("NIP\t: ", self.nip)
  19.         print("Alamat\t ", self.alamat)
  20.         print("Gaji\t ", self.daftarGaji)
  21.  
  22. class DaftarGaji(object):
  23.     def __init__(self, listPegawai):
  24.         self.listPegawai = listPegawai
  25.     def daftarGaji(self, Pegawai):
  26.         self.Pegawai = Pegawai
  27.     def tampilkanSemuaGaji(self):
  28.         print("Total Gaji Semua Karyawan\t : ", self.tampilkanSemuaGaji)
  29.        
  30. def main():
  31.     pegawai = Pegawai("Bejo", 10101001010, "gubeng")
  32.     pegawai.tampilkan()
  33.  
  34. if __name__ == "__main__":
  35.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement