Question: please implement all prompts and methods as shown in sample output... Instructions: In this assignment, you are required to create a Java program that implements

please implement all prompts and methods as shown in sample output...
Instructions: In this assignment, you are required to create a Java program that implements an Employee Management System using object-oriented principles. The system should consist of the following classes:
Employee Class:
Attributes: employeeID, name, department, salary, designation
Methods:
Accessor and mutator methods for all attributes
equals method to compare employees based on their designations
addBonus method to calculate the salary with a default bonus of $200/month
Manager Class (Subclass of Employee):
Methods:
Override the addBonus method to calculate the salary with a bonus of $300/month
Clerk Class (Subclass of Employee):
Methods:
Override the addBonus method to calculate the salary with a bonus of $100/month
Main Class:
Testbed for the system
Create instances of Employee, Manager, and Clerk with sample data
Demonstrate the use of methods like display, addBonus, and calculateDeductions
Calculate and display the total deductions for all employees based on their leave records (considering 20 working days per month)
Your program should showcase the following concepts:
Inheritance: Use of subclass (Manager and Clerk) extending superclass (Employee)
Method Overriding: Override the addBonus method in subclasses to customize behavior
Polymorphism: Use of overridden methods to achieve different behaviors based on the object's type
Submit your Java program with appropriate comments and test cases to demonstrate the functionality of the Employee Management System.
Sample output:
Employee ID: 1
Name: John
Department: HR
Salary: $3000.0
Designation: Employee
Employee ID: 2
Name: Alice
Department: Finance
Salary: $4000.0
Designation: Manager
Employee ID: 3
Name: Bob
Department: Admin
Salary: $2500.0
Designation: Clerk
Salaries with bonuses:
John Salary with Bonus: $3200.0
Alice Salary with Bonus: $4300.0
Bob Salary with Bonus: $2600.0
Deductions:
John Deductions was absent for 2 days: $300.0
Alice Deductions was absent for 3 days: $450.0
Bob Deductions was absent for 4 days: $600.0
Total Deductions: $1350.0

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!