-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex2_Employee_employee.py
More file actions
31 lines (25 loc) · 1001 Bytes
/
ex2_Employee_employee.py
File metadata and controls
31 lines (25 loc) · 1001 Bytes
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
31
class Employee():
"""To show the employees' info."""
def __init__(self, f_name, l_name, annual_salary=''):
self.f_name = f_name
self.l_name = l_name
self.annual_salary = annual_salary
def show_profile(self):
full_profile = self.f_name + ' ' + self.l_name
return full_profile.title()
def give_raise(self):
if self.annual_salary < 30000:
raised_salary = self.annual_salary + 5000
else:
raised_salary = self.annual_salary + 3000
return raised_salary
star_employee = Employee('younggi', 'seo', 28000)
senior_employee = Employee('Luke', 'Konrath', 5500)
print("- The evaluated employees list: \n 1. " + star_employee.show_profile() +
"\n "
"2. " +
senior_employee.show_profile() +
"\n\n- The improvement of the salary in 2019: \n 1. Rising Star Members "
": $" +
str(star_employee.give_raise())
+ "\n 2. Current Star Members: $" + str(senior_employee.give_raise()))