Write a java program to calculate the bonus of employee using class and object as per following scenario: Write java code to read employee name, Salary and year of services and two methods. Calculate and display the bonus of the employee as per following conditions: If years of service is in between 15 and 10 years then bonus is 100% of the salary. Else the years of service is in between 9 to 6 years, then bonus is 75% of the salary Else the years of service is between 5 to 1 years, then bonus is only 50% of the salary. otherwise ,no bonus Create class that hosts the main method and create one object. The created object should be used to call all methods and display appropriate messages.
Write a java program to calculate the bonus of employee using class and object as per following scenario:
Write java code to read employee name, Salary and year of services and two methods. Calculate and display the bonus of the employee as per following conditions:
If years of service is in between 15 and 10 years then bonus is 100% of the salary.
Else the years of service is in between 9 to 6 years, then bonus is 75% of the salary
Else the years of service is between 5 to 1 years, then bonus is only 50% of the salary.
otherwise ,no bonus Create class that hosts the main method and create one object. The created object should be used to call all methods and display appropriate messages.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images