use python (jupitor notebook) Create a EmployeeD class which is a subclass of UserDictand overrides.
use python (jupitor notebook) Create a EmployeeD class which is a subclass of UserDictand overrides __getitem__ and __setitem__ methods. Then read from your provided file to create a sequence of EmployeeD instancesusing generatorfunctionand printthe total salaries. please add the running results. {
“cells”: [
{
“cell_type”: “markdown”,
“metadata”: {},
“source”: [
“### Python OOPn”,
“- https://www.tutorialspoint.com/python/python_classes_objects.htm”
]
},
{
“cell_type”: “code”,
“execution_count”: 2,
“metadata”: {},
“outputs”: [
{
“name”: “stdout”,
“output_type”: “stream”,
“text”: [
“Name : Zara, Salary: 2000, Age: 21n”,
“Name : Manni, Salary: 5000, Age: 25n”,
“Total Employee: 2n”,
“Does employee has age attribute? Falsen”,
“Employee.__doc__: Common base class for all employeesn”,
“Employee.__name__: Employeen”,
“Employee.__module__: __main__n”,
“Employee.__bases__: (,)n”,
“Employee.__dict__: {'__module__': '__main__', '__doc__': 'Common base class for all employees', 'empCount': 2, '__init__': , 'displayCount': , 'displayEmployee': , '__dict__': , '__weakref__': }n”
]
}
],
“source”: [
“class Employee: #same as Employee(object)n”,
” 'Common base class for all employees'n”,
” empCount = 0 #class attributen”,
“n”,
” #name, salary and _age are instance attributesn”,
” def __init__(self, name, salary, age): #initializer must have at least argument beside selfn”,
” self.name = namen”,
” self.salary = salaryn”,
” self.__age = agen”,
” Employee.empCount += 1n”,
” n”,
” def displayCount(self):n”,
” print(“Total Employee: {0}””.format(Employee.empCount))n””
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more