Question: in JAVA please. will upvote if code is properly written! Task: Create a class named Employee that can be used to calculate the salaries of

in JAVA please. will upvote if code is properly written!
in JAVA please. will upvote if code is properly written! Task: Create
a class named Employee that can be used to calculate the salaries

Task: Create a class named Employee that can be used to calculate the salaries of different employees. The Employee class should keep a track of the employee ID, name, department, salary, and designation with appropriate accessor and mutator methods. Also create an equals () method that overrides Object's equals 0 method, where employees can check if their designation is identical. Next, create two additional classes named Manager and Clerk that are derived from Employee. Create an overridden method named addBonus that returns the salary of the employee after adding up the bonus. There is a default bonus of $200/ month. Managers have a bonus of $300/ month and clerks have a bonus of $100/ month. Finally, create a display method to print the details of the employee. Test your classes from the main method. You may assume the initial salary of an employee and other necessary values. Now, extend this to calculate the salary deductions based on the number of days an employee is on leave. Consider 20 working days per month. Add an overridden method that calculates the deductions of each employee based on their leave record. In your main method, create an array deduction (of type integer), filled with sample data of all types of Employees. Finally, calculate the total deduction that iterates through the array and returns the total amount of deductions of all the employees in a month. The following picture shows the sample console output after the execution of the main program

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 Databases Questions!