Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions