employee module#

class employee.Employee(name: str, job_title: str)#

Bases: object

Class for keeping track of employee details.

Parameters:
  • name (str) – full name of Employee

  • job_title (str) – job title

employee_id#

a unique Employee id - generated on construction

Type:

str

promote_employee(job_title)#

Assigns a new job title to Employee

Parameters:

job_title (str) – the new job title

Raises:

ValueError – If the new job title is not valid

update_contact_info(name: str) str#

Update Employee’s contact inforamtion

Parameters:

new_name (str) – new Employee’s name

Returns:

Employee’s old name

Return type:

str

employee.JOB_TITLES = ['SALES_REP', 'REGIONAL_MANAGER', 'MANAGER', 'HR', 'ACCOUNTING']#

A list of valid job titles at Dunder Mifflin.

Type:

list of str