Question: java please Write a class named Employee. It should have the following fields Name, ID Write an abstract method called getAnnualSalary() Next write a class

 java please Write a class named Employee. It should have the

java please

Write a class named Employee. It should have the following fields Name, ID Write an abstract method called getAnnualSalary() Next write a class named Daily Worker that inherits from Employee. DailyWorker has fields to hold information: 1) dayRate:(Double) The amount of money he is paid per day. Write a method getAnnualSalary() to compute the annual salary Daily Worker gets paid. Next write a class named Monthly Worker that inherits from Employee. MonthlyWorker has fields to hold o information: 1) salary:(Double) The monthly salary he is paid. Write a method getAnnualSalary() to compute the annual salary MonthlyWorker gets paid. Write appropriate constructors and toString for all classes.. Write appropriate compareTo methods to cover all classes, comparelo method should be based on AnnualSalary. Write a driver class to test your program. Create one arraylist of 4 different Employees (you can hard-code them or enter them from the keyboard) - 2 DailyWorker, 2 MonthlyWorker. Your program should sort the Employees using the Java's arraylist sorting, and write a method to print to screen all the Employees information including annual salary in sorted order. You must use the toString() method. AT B

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!