2021 Beginners Guide to Python Programming Language: A Crash Course to Mastering Python in One Hour by Elmer Gary & Elmer Gary

2021 Beginners Guide to Python Programming Language: A Crash Course to Mastering Python in One Hour by Elmer Gary & Elmer Gary

Author:Elmer, Gary & Elmer, Gary [Elmer, Gary]
Language: eng
Format: epub
Published: 2020-12-28T16:00:00+00:00


# derived class

clas s Manager(Employee):

​ # constructor

​ de f __init__(self, name, gender, role):

Manager.__init__(self, name, gender, role)

​ # public member function

​ de f displayDetails(self):

# accessing protected data members of super class

print("Name: ", self._name)

# accessing protected member functions of super class

self._displayGenderAndRole ()

# creating objects of the derived class

obj = Manager("Frank", Male, "Analyst")

# calling public member functions of the class

obj.displayDetails()



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.