Question: Write a Python class Employee to manage employee details, including name ( public ) , ID ( private ) , salary ( protected ) and

Write a Python class Employee to manage employee details, including name(public), ID (private),salary(protected) and years worked (protected), with functionality to apply a bonus of 5% if the employee has worked more than 5 years. Include all getters and setters along with additional function to modify salary based on the years worked and bonus.
Create 3 instances for Employee class to test your code and these instances should be through user input.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!