Question: Department class is provided. Create three class methods as follows: 1. set_name() to define the name of the department, 2. add_employee() to add an employee

Department class is provided. Create three class methods as follows: 1. set_name() to define the name of the department, 2. add_employee() to add an employee to the department. 3. employees() to return all the employees working in such department """ class Department(object): def __init__(self, name=None): self.employees = [] # list of employees objects from problem 1. self.name = name def set_name(self, name): """ Defines the department name :param name: :return: VOID """ # TODO: implement your code here pass def add_employee(self, employee_name): """ Adds an employee to this department :param employee_name: :return: VOID """ # TODO: create a employee object # TODO: add the employee object to the self.employees list. pass def list_of_employees(self): """ :return: the list of employees working in this department. """ # TODO: return the self.employee list return None print(' ')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!