Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

project-8c Write a class named Employee that has data members for an employee's name, ID_number, salary, and email_address (you must use those names - don't

project-8c

Write a class named Employee that has data members for an employee's name, ID_number, salary, and email_address (you must use those names - don't make them private). Write a function named make_employee_dict that takes as parameters a list of names, a list of ID numbers, a list of salaries and a list of email addresses (which are all the same length). The function should take the first value of each list and use them to create an Employee object. It should do the same with the second value of each list, etc. to the end of the lists. As it creates these objects, it should add them to a dictionary, where the key is the ID number and the value for that key is the whole Employee object. The function should return the resulting dictionary.

Remember in your testing that printing an object of a user-defined class will just print out the object's type and address in memory. You must specifically access its data members if you want to print their values.

The file must be named: make_employee_dict.py

the programming language is a python, python 2.7(venv) pycharmprojects/greeting/venv/bin/python

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Explain the Neolithic age compared to the paleolithic age ?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago