Write a class named employee that holds the following data


Lab: Employee Class

Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job title.

Once you have written the class, write a program that creates three Employee objects to hold the following data:

Name ID Number Department Job Title

Susan Meyers 47899 Accounting Vice President

Mark Jones 39119 IT Programmer

Joy Rogers 81774 Manufacturing Engineer

The program should store this data in the three objects and then display the data for each employee on the screen.

# Fill in this space to construct an Employee class

class Employee:

def __init__(self, name, id_number, department, title):

def set_name(self, name):

def set_id_number(self, id_number):

def set_department(self, department):

def set_title(self, title):

def get_name(self):

def get_id_number(self):

def get_department(self):

def get_title(self):

def __str__(self):

def main():

# Fill in this space to create three instances of Employee

print('Employee 1:')

print(emp1)

print()

print('Employee 2:')

print(emp2)

print()

print('Employee 3:')

print(emp3)

# Call the main function.

main()

Here is a sample run:

Employee 1:

Name: Susan Meyers

ID number: 47899

Department: Accounting

Title: Vice President

Employee 2:

Name: Mark Jones

ID number: 39119

Department: IT

Title: Programmer

Employee 3:

Name: Joy Rogers

ID number: 81774

Department: Manufacturing

Title: Engineer

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write a class named employee that holds the following data
Reference No:- TGS01088565

Expected delivery within 24 Hours