Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- class Pegawai(object):
- def __init__(self, nama, nip, alamat):
- self.nama = nama
- self.nip = nip
- self.alamat = alamat
- def staf(self, jumlahKehadiran, tarifHarian):
- self.jumlahKehadiran = jumlahKehadiran
- self.tarifHarian = tarifHarian
- def dosen(self, jumlahSKS, tarifSKS):
- self.jumlahSKS = jumlahSKS
- self.tarifSKS = tarifSKS
- def tampilkan(self):
- print("Nama\t: ", self.nama)
- print("NIP\t: ", self.nip)
- print("Alamat\t ", self.alamat)
- print("Gaji\t ", self.daftarGaji)
- class DaftarGaji(object):
- def __init__(self, listPegawai):
- self.listPegawai = listPegawai
- def daftarGaji(self, Pegawai):
- self.Pegawai = Pegawai
- def tampilkanSemuaGaji(self):
- print("Total Gaji Semua Karyawan\t : ", self.tampilkanSemuaGaji)
- def main():
- pegawai = Pegawai("Bejo", 10101001010, "gubeng")
- pegawai.tampilkan()
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement