Personal Information Class: Design a class called Employee that holds the following data about an employee: name ID number Department Job Title Class. Store your class in a separate file called employee.py. Your class will have an initializer method that will be passed the information entered by the user as arguments. Write appropriate accessor and mutator methods for each data attribute. Write a __str__ method to print the contents of the class (see example of __str__ on p. 523). Main program: Your main program should create three instances of the class. Your program should get the information from the user and pass it as parameters to the initializer method. Using the __str__ method invoked by the print function, the program should display the personal information for the three individuals. Output and Sample Dialog: Enter employee name: Mary Smith Enter employee ID: 123456 Enter department: Accounting Enter position: Accountant Enter employee name: Joe Morales Enter employee ID: 678910 Enter department: Engineering Enter position: Engineer Enter employee name: Marie Zinc Enter employee ID: 45678 Enter department: Customer Service Enter position: Customer Service Rep Employee 1 : Name: Mary Smith ID number: 123456 Department: Accounting Title: Accountant Employee 2 : Name: Joe Morales ID number: 678910 Department: Engineering Title: Engineer Employee 3 : Name: Marie Zinc ID number: 45678 Department: Customer Service Title: Customer Service Rep Note: You may not actually be using the setter and getter methods but to be complete, your class needs to include them. See Cellphone class example. Instead of using this method of printing, invoke __str__ in main by using print(object_name). Turn in two files, employee.py and your main program (yourlastname_Lab10.py), along with the regular documentation requirements required by the syllabus and as listed in Lab 2
Personal Information Class:
Design a class called Employee that holds the following data about an employee:
name
ID number
Department
Job Title
Class. Store your class in a separate file called employee.py.
Your class will have an initializer method that will be passed the information entered by the user as arguments.
Write appropriate accessor and mutator methods for each data attribute.
Write a __str__ method to print the contents of the class (see example of __str__ on p. 523).
Main program:
Your main program should create three instances of the class. Your program should get the information from the user and pass it as parameters to the initializer method. Using the __str__ method invoked by the print function, the program should display the personal information for the three individuals.
Output and Sample Dialog:
Enter employee name: Mary Smith
Enter employee ID: 123456
Enter department: Accounting
Enter position: Accountant
Enter employee name: Joe Morales
Enter employee ID: 678910
Enter department: Engineering
Enter position: Engineer
Enter employee name: Marie Zinc
Enter employee ID: 45678
Enter department: Customer Service
Enter position: Customer Service Rep
Employee 1 :
Name: Mary Smith
ID number: 123456
Department: Accounting
Title: Accountant
Employee 2 :
Name: Joe Morales
ID number: 678910
Department: Engineering
Title: Engineer
Employee 3 :
Name: Marie Zinc
ID number: 45678
Department: Customer Service
Title: Customer Service Rep
Note: You may not actually be using the setter and getter methods but to be complete, your class needs to include them.
See Cellphone class example. Instead of using this method of printing, invoke __str__ in main by using print(object_name).
Turn in two files, employee.py and your main program (yourlastname_Lab10.py), along with the regular documentation requirements required by the syllabus and as listed in Lab 2. Do not forget to include the UML and Hierarchy diagrams.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)