python initialize a class
class EMPLOYEE:
raise_amt = 1.04
# constructor
def __init__(self, first, last, pay):
self.first = first
self.last = last
self.email = first + '.' + last + '@email.com'
self.pay = pay
# methods
def fullname(self):
return '{} {}'.format(self.first, self.last)
def apply_raise(self):
self.pay = int(self.pay * self.raise_amt)
def greeting(self):
return f'My name is {self.first} and my email is {self.email}'