1
0
forked from tdwojak/Python2017
Python2017/labs04/task02.py
2017-12-03 18:10:30 +01:00

21 lines
403 B
Python

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
class Employee:
id_prac = 1
def __init__ (self,imie, nazwisko):
self.imie = imie
self.nazwisko = nazwisko
self.id_prac = Employee.id_prac
Employee.id_prac += 1
def get_id (self):
return self.id_prac
prac1 = Employee("X1","Y1")
prac2 = Employee("X2","Y2")
print(prac1.get_id())
print(prac2.get_id())