office module#

class office.TheOffice(regional_manager: str, employees: Set[Employee], location: str)#

Bases: object

A class representing an office that holds information about its employees and their sales. It exposes methods make and view sales for each employee.

Parameters:
  • regional_manager (str) – The name of the employee.

  • employees (Set[Employee]) – A set of employee objects.

  • location (str) – The name of the region the office is located.

get_employee_sales(employee: Employee) int#

Method that returns the number of sales given an employee.

Parameters:

employee (Employee) – The employee whose sales number we are interested in.

Returns:

The total number of sales the employee has made.

Return type:

int

record_sale(employee: Employee) None#

Method that adds a sale to the employee key of the sales dict.

Parameters:

employee (Employee) – The employee who has made the sale.