28 lines
581 B
Python
28 lines
581 B
Python
#!/usr/bin/env python2
|
|
# -*- coding: utf-8 -*-
|
|
|
|
class Employee:
|
|
_id = 0
|
|
|
|
def __init__(self, name, surname):
|
|
Employee._id += 1
|
|
self.id = Employee._id
|
|
self.name = name
|
|
self.surname = surname
|
|
|
|
def get_id(self):
|
|
return self.id
|
|
|
|
|
|
class Recruiter(Employee):
|
|
recruited = []
|
|
|
|
def recruit(self, Employee):
|
|
emp_id = Employee.id
|
|
self.recruited.append(emp_id)
|
|
|
|
|
|
class Programmer(Employee):
|
|
def __init__(self, name, surname, Recruiter):
|
|
super().__init__(name, surname)
|
|
self.recruiter = Recruiter.id |