filmov
tv
Assignment on Static Level 3 |Assignment Set-5|Object Oriented Programming Using Python|NM|Infosys

Показать описание
#naanmudhalvan #infosys #springboard
#answers
#objectorientedprogrammingusingpython
#answersdotcom
#staticlevel3
A company is in the process of providing annual hike to its employees based on incentives and performance of the employee.
A partial python program has been written for the above requirement, complete the code by using the information and part of class diagram given below:
Class Description:
The program has three classes – Company, Employee and PermanentEmployee. Company and Employee classes are already coded for you. Refer starter code.
Employee class:
Every employee is given a performance rating (1-3) at the end of every year
Last five year's performance rating of an employee is stored in the attribute, performance_list
Refer table for example and interpretation of data in performance_list, assuming current year is 2015
0 1 2 3 4
performance_list
1
2
1
1
2
Corresponding year 2010 2011 2012 2013 2014
Permanent Employee class:
identify_performance_hike():
Permanent employees are eligible for performance hike based on their last three years performance as given in table
Identify the hike % and return it. If hike is not applicable, return None
Performance for last three years
Hike %
Last year
Last but one
Last but two
1
1
Not considered
5
1
2
1
3
identify_job_level_hike():
Permanent employees are eligible for hike based on job level
Identify job level based hike using the information provided in the Company class and return it. If hike cannot be identified, return None
identify_incentive():
Permanent employees are eligible for company level, employee level and permanent employee level incentives
Calculate total incentive (in Rs) and return it
calculate_salary(): Calculate total salary
Implement it in the same way as it is implemented in Employee class
Note: Perform case sensitive string comparison
For testing:
Create objects of Company class and PermanentEmployee class
Invoke calculate_salary() on PermanentEmployee object
Display the details of the employee
#answers
#objectorientedprogrammingusingpython
#answersdotcom
#staticlevel3
A company is in the process of providing annual hike to its employees based on incentives and performance of the employee.
A partial python program has been written for the above requirement, complete the code by using the information and part of class diagram given below:
Class Description:
The program has three classes – Company, Employee and PermanentEmployee. Company and Employee classes are already coded for you. Refer starter code.
Employee class:
Every employee is given a performance rating (1-3) at the end of every year
Last five year's performance rating of an employee is stored in the attribute, performance_list
Refer table for example and interpretation of data in performance_list, assuming current year is 2015
0 1 2 3 4
performance_list
1
2
1
1
2
Corresponding year 2010 2011 2012 2013 2014
Permanent Employee class:
identify_performance_hike():
Permanent employees are eligible for performance hike based on their last three years performance as given in table
Identify the hike % and return it. If hike is not applicable, return None
Performance for last three years
Hike %
Last year
Last but one
Last but two
1
1
Not considered
5
1
2
1
3
identify_job_level_hike():
Permanent employees are eligible for hike based on job level
Identify job level based hike using the information provided in the Company class and return it. If hike cannot be identified, return None
identify_incentive():
Permanent employees are eligible for company level, employee level and permanent employee level incentives
Calculate total incentive (in Rs) and return it
calculate_salary(): Calculate total salary
Implement it in the same way as it is implemented in Employee class
Note: Perform case sensitive string comparison
For testing:
Create objects of Company class and PermanentEmployee class
Invoke calculate_salary() on PermanentEmployee object
Display the details of the employee
Комментарии