Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started