Fork and clone this repository in your python
directory.
In this task, you'll be creating the HR system for a company. This company has two types of employees: non-managerial employees and managers.
The following example assumes the current year is 2019.
Welcome to HR Pro 2019
Options:
1. Show Employees
2. Show Managers
3. Add An Employee
4. Add A Manager
5. Exit
What would you like to do? 3
-----------------
Name: shosho
Age: 24
Salary: 666
Employement year: 2018
Employee added succesfully
Options:
1. Show Employees
2. Show Managers
3. Add An Employee
4. Add A Manager
5. Exit
What would you like to do? 1
-----------------
Employees
Name: shosho, Age: 24, Salary: 666, Working Years: 1
-----------------
Options:
1. Show Employees
2. Show Managers
3. Add An Employee
4. Add A Manager
5. Exit
What would you like to do? 4
-----------------
Name: sammy
Age: 52
Salary: 4600
Employement Year: 1900
Bonus Percentage: .3
Manager added succesfully
Options:
1. Show Employees
2. Show Managers
3. Add An Employee
4. Add A Manager
5. Exit
What would you like to do? 2
-----------------
Managers
Name: sammy, Age: 52, Salary: 4600, Working Years: 119, Bonus: 1380.000000
-----------------
Options:
1. Show Employees
2. Show Managers
3. Add An Employee
4. Add A Manager
5. Exit
What would you like to do? 5
- In this task you need to create two classes:
-
Employee
:name
age
salary
employment_year
get_working_years()
today
-employment_year
-
Manager
:name
age
salary
employment_year
bonus_percentage
get_working_years()
today
-employement_date
get_bonus()
bonus_percentage
*salary
- Where the
Manager
class inherits from theEmployee
class.
-
- Define a list of
Employee
objects for non-managerial employees, and a list ofManager
objects for managers. - Print the options to the HR employee (the user).
- If
1
was chosen, print the employees information (the employees list). - If
2
was chosen, print the managers information (the managers list). - If
3
was chosen, allow the HR employee to add a non-managerial employee to the system (the employees list). - If
4
was chosen, allow the HR employee to add a manager to the system (the managers list). - If
5
was chosen, stop the program. - Push your code.
Hint: The __str__
method can help you with printing the employees information. You can read about it here