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 objectoriented 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 $month
Manager Class Subclass of Employee:
Methods:
Override the addBonus method to calculate the salary with a bonus of $month
Clerk Class Subclass of Employee:
Methods:
Override the addBonus method to calculate the salary with a bonus of $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 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:
Name: John
Department: HR
Salary: $
Designation: Employee
Employee ID:
Name: Alice
Department: Finance
Salary: $
Designation: Manager
Employee ID:
Name: Bob
Department: Admin
Salary: $
Designation: Clerk
Salaries with bonuses:
John Salary with Bonus: $
Alice Salary with Bonus: $
Bob Salary with Bonus: $
Deductions:
John Deductions was absent for days: $
Alice Deductions was absent for days: $
Bob Deductions was absent for days: $
Total Deductions: $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
