Python Program for Employee Details || Single Inheritance || Python
In this we are going to see a basic program to get employee details by single inheritance in Python Programming Language.



class Employee():
    def __init__(self,name,salary,experience):
        print("Employee Class")
        self.name = name 
        self.salary = salary
        self.experience = experience
    def getInfo(self):
        print("Employee Information")
        print("Name :",self.name,"\nSalary :",self.salary,"\nExperience :",self.experience)
    
class Boss(Employee):
    def __init__(self,name,salary,experience,age):
        super().__init__(name,salary,experience)
        print("Boss Class")
        self.age = age
    def getAge(self):
        print("Boss Age Is: ",self.age)
        
b = Boss("Abhishek",10000,3,35)
b.getAge()
b.getInfo()

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post