Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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() 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 RM200/month. Managers have a bonus of RM300 /month and clerks have a bonus of RM100/month. Finally create a display method to print the details of the employee. You may assume the initial salary of an employee and other necessary values. Test your classes from a main method. Use the abstract class and methods in your solution

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are transferred-out materials?

Answered: 1 week ago

Question

The paleolithic age human life, short write up ?

Answered: 1 week ago