Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('Karyawan.php');
- class karTetap extends Karyawan
- {
- public $golongan;
- public $tunjangan;
- public $totalgaji;
- public function construct()
- {
- parent::__construct(); //panggil induk
- $this->golongan;
- $this->tunjangan;
- $this->totalgaji;
- }
- public function setGol($gol)
- {
- if($gol=="IA")
- {$gapok=3000000;}
- if($gol=="IIA")
- {$gapok=2500000;}
- if($gol=="IIB")
- {$gapok=2000000;}
- if($gol=="")
- {$gapok=0;}
- $this->golongan=$gol;
- $this->gapok=$gapok;
- }
- public function getGol()
- {
- return $this->golongan;
- }
- public function setTunjangan($tunj)
- {
- if($tunj=="")
- {$tunj=0;}
- $this->tunjangan=$tunj;
- }
- public function getTunjangan()
- {
- return $this->tunjangan;
- }
- public function setGapok($gapok)
- {
- $this->gapok=$gapok;
- }
- public function getGapok()
- {
- return $this->gapok;
- }
- public function hitungGaji()
- {
- $this->totalgaji = $this->gapok + $this->tunjangan;
- return $this->totalgaji;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement