Facebook
From 3, 5 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 55
  1. from Employee import Employee
  2.  
  3. class Developer(Employee):
  4.     def __init__(self,name,pay,d):
  5.         super().__init__(name,pay)
  6.         self._prog_lang=d
  7.    
  8.     def apply_pay_rise(self):
  9.         self._pay=self._pay*Employee.pay_rise+5000
  10.        
  11.        
  12.        
  13.        
  14.        
  15.       class Employee:
  16.     pay_rise=1.1
  17.     def __init__(self,name,pay):
  18.         #print("Inside Employee init method")
  19.         self._name=name
  20.         self._pay=int(pay)
  21.         self._email=name+".@gmail.com"
  22.        
  23.     def apply_pay_rise(self):
  24.         self._pay=self._pay*Employee.pay_rise    
  25.    
  26.     @property
  27.     def pay(self):
  28.         return self._pay