answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
svp [43]
2 years ago
7

Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It shou

ld have an init method that takes four values and uses them to initialize the data members. It should have get methods named get_name, get_ID_number, get_salary, and get_email_address. Write a separate function (not part of the Employee class) 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. For example, it could be used l
Computers and Technology
1 answer:
mario62 [17]2 years ago
6 0

Solution :

class Employee:

   #Define the

   #constructor.

   def __$\text{init}$__($\text{self, nam}e$,  ID_number, $\text{salary}$, email):

       #Set the values of

       #the data members of the class.

       $\text{self.nam}e$ = name

       $\text{self.ID}$_number = ID_number

       $\text{self.salary}$ = salary

       self.email_address = email

#Define the function

#make_employee_dict().

def make_employee_dict(list_names, list_ID, list_salary, list_email):

   #Define the dictionary

   #to store the results.

   employee_dict = {}

   #Store the length

   #of the list.

   list_len = len(list_ID)

   #Run the loop to

   #traverse the list.

   for i in range(list_len):

       #Access the lists to

       #get the required details.

       name = list_names[i]

       id_num = list_ID[i]

       salary = list_salary[i]

       email = list_email[i]

       #Define the employee

       #object and store

       #it in the dictionary.

       employee_dict[id_num] = Employee(name, id_num, salary, email)

   #Return the

   #resultant dictionary.

   return employee_dict

You might be interested in
Find true or false. A hacker is hacking software with access in sensitive information from your computer​
Alina [70]
ITS TRUE!!I SEARCHED IT
7 0
1 year ago
An attacker has been successfully modifying the purchase price of items purchased on the company's web site. The security admini
Kruka [31]

Answer:

Form the given statement i have come to know that the by changing hidden form values attacker has been able to modify the purchase price.

Explanation:

User can change a hidden field is not different from a common field from browser or server side.

If you want to store data then user must have to store them on server -side on a session and it is a fastest way.

8 0
2 years ago
Mellissa wants to pursue a career in database administration. Select the requirements needed to achieve this.
adelina 88 [10]
I think its the answer is 4 
8 0
2 years ago
Read 2 more answers
6. A small design agency you are consulting for will be creating client websites and wants to purchase a web server so they can
Novay_Z [31]

Answer:

Explanation:

The best way to advise the agency in this matter would be to help them completely understand the total cost of ownership of the server. This includes the server itself but many other factors as well. Such as any and all server software and application software that they will need, an IT server manager, facility costs, security costs, backup features. These are some of the main costs that they will be incurring but there may be more unforeseen costs. Therefore the best way to advise them is by providing all of this information so that they can make the most informed decision possible.

3 0
2 years ago
____________ is defined as the set of activities that revolve around a new software product, from its inception to when the prod
Elis [28]

Answer:

The answer is Application Lifecycle Management

Explanation:

Application lifecycle management is the complete handling and management of computer software programs from inception till it is retired.

It covers various aspects like requirement gathering management; software architecture; software programming, testing, and maintenance; change management, with continuous integration, release management, upgrades, deployment and so-on.

Application Lifecycle Management is defined as the set of activities that revolve around a new software product, from its inception to when the product matures and perhaps retires

4 0
2 years ago
Other questions:
  • Wesley has to create a web banner to announce a “Back to School” sale by an online retailer. Which information should he determi
    15·2 answers
  • Which programming element is used by a game program to track and display score information?
    10·2 answers
  • Haley is helping to choose members for a customer satisfaction team. Which of the following employees demonstrate skill in focus
    13·1 answer
  • Write an if-else statement that prints "Goodbye" if userString is "Quit", else prints "Hello". End with newline.
    11·2 answers
  • Adrian has decided to create a website to catalog all the books he has in his personal library. He wants to store this informati
    11·2 answers
  • There is a file "IT4983" in my home (personal) directory. I don’t know my current working directory. How can I find out the file
    11·1 answer
  • Sean is forecasting the time and cost of developing a customized software program by looking at the number of inputs, outputs, i
    8·1 answer
  • Write a program that takes in an integer in the range 10 to 100 as input. Your program should countdown from that number to 0, p
    12·1 answer
  • 5.16 *zyLab: Hello IDE The goal of this problem is learn how to use Eclipse or IntelliJ. Submit the source code files (.java) be
    12·1 answer
  • Choose the correct function to convert the user’s response to the number 3.5. >>> answer = input("How much does the sam
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!