Question: Please code this with java. 1. Thank you Define an interface IEmployee with the following abstract methods and property: getBiMonthLySalary() : this method returns the

Please code this with java.

1. Thank you Define an interface IEmployee with the following abstract methods and property:

getBiMonthLySalary() : this method returns the salary the employee makes in half a month time

getYearlyEarnedVaction() : this method returns the number of vacation days the employee has earned. Abstract property EmpID : this is an abstract property with the get only (research how to define an abstract propertY)

2. In Frame1 Create a List of IEmployee type Add a method called ProcessEmployees. This method accepts a List of IEmployee and returns a void.

Write the code to sequence through the list and display the empID, the Salary (in currency) and days of vacation earned.

You can use jTextArea or even JTable . (should be able to do question 2 before even creating the classes as stated in question

3. Add an abstract class Employee that inherits the interface IEmployee Define private fields: firstname, lastname, empId and yearHired Add the obvious constructor and properties: get only Override the getYearlyEarnedVaction() method: this method computes the number of vacation days the employee has earned this year. Here are the rules: if employees have less than 5 years of employment, they get 3 days vacation. If they have 5 or more, but less than 10 years, they get 7 days of vacation. If they have over 10 years, they get 7 days + a day for each year over 10 years (example: if they worked 15 years, they get 7 + 5 = 12 days of vacations Redeclare the getBiMonthlySalary as abstract. (when a class choose not to override an abstract method, it must declare it as abstract and consequently declare itself as abstract Override the Object Equals and ToString()

4. Now Add a class SeasonedEmployee that inherits the Employee class Add an extra private field: yearlySalary and override the getBiMonthlySalary Override the ToString()

5. Also Add a class HourlyEmployee that inherits the Employee interface Add two extra private fields : hoursWorked (during a pay period: month), and hourlyWage. Also override the getBiMonthlySalary() and the ToString()

Back to Frame1

Have a method to Preload the list of employees with at least 3 of each in random order. Have a button to call the display method to display all the employees Display all the information about the employee. If you had everything in the ToString() then using the method is enough, unless you are using listview.

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!