-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex_7_1.py
More file actions
37 lines (27 loc) · 1.13 KB
/
ex_7_1.py
File metadata and controls
37 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Employee:
def __init__(self, name, id_number):
self.name = name
self.id_number = id_number
def get_info(self):
return f'Имя: {self.name}. Id: {self.id_number}.'
class Manager(Employee):
def __init__(self, name, id_number, department):
super().__init__(name, id_number)
self.department = department
def manager_project(self):
return f'{super().get_info()} Менеджер: {self.department}.'
class Technician(Employee):
def __init__(self, name, id_number, specialization):
super().__init__(name, id_number)
self.specialization = specialization
def perform_maintenance(self):
return f'{super().get_info()} Техник отвечающий за: {self.specialization}.'
class TeachManager(Manager, Technician):
def __init__(self, name, id_number, department, specialization):
super().__init__(name,id_number,department)
self.specialization = specialization
self.team = []
def add_employee(self, man):
self.team.append(man)
def get_team_info(self):
print(f'Команда: {self.team}.')