object-orientated programming

More Object-Orientated Programming

class Employee: 
    
    def __init__(self,first, last, pay):
        self.first = first
        self.last = last
        self.email = first+'.'+last+"@company.com"
        self.pay = pay
        
    def fullname(self):
        return '{} {}'.format(self.first, self.last)
        
emp_1 = Employee("Corey","Schafer",50000)
emp_2 = Employee("test","user",60000)

#print(emp_1)
#print(emp_2)
print(emp_1.email)
print(emp_2.email)
print(emp_1.fullname())