Facebook
From 2, 5 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 52
  1. from Employee import Employee
  2.  
  3. class Developer(Employee):
  4.    
  5.     def __init__(self,name,pay,prog_lang):
  6.    
  7.         self._prog_lang=prog_lang
  8.         super().__init__(name,pay)
  9.    
  10.     def __str__(self):
  11.         return(super().__str__()+" Programming Language : "+self._prog_lang)
  12.        
  13.        
  14.   class Employee:
  15.    
  16.     def __init__(self,name,pay):
  17.         self._name=name
  18.         self._pay=pay
  19.         self._email=self._name+".@gmail.com"
  20.         print("Inside Employee init method")
  21.        
  22.     def __str__(self):
  23.        
  24.         return("Name : "+self._name+" Email : "+self._email+" Pay : "+self._pay)