Question: Java - - - have the same eid. name ( as a String ) - The name of the employee. department ( as a String

Java--- have the same eid.
name (as a String)- The name of the employee.
department (as a String)- The department the employee belongs to.
yearJoined (as an int)- The year the employee joined the company.
salary (as a double)- The salary of the employee.
The Employee class should have constructors and methods (getters, setters, and toString()) to manage the above information as well as the link to the next and previous employees in the list.
EmployeeList Class: Write the EmployeeList class to hold objects of the class Employee. This class should define the following:
Two instance variables first and last to keep the reference of the first and last employees in the list.
An instance variable count that stores the size of the list. It should be updated whenever a new employee is added to the list or an existing employee is removed.
These are the only variables of this class. Do not add any other variable to the class.
EmployeeList should implement the following interface:TestEmployeeList Class: Write a TestEmployeeList class to test the EmployeeList class. This class should have a main method in which you perform the following actions:
Create an EmployeeList object.
Insert 3 Employees at the end of the created list.
Insert 3 Employees at the front of the list.
Insert 3 Employees at the following positions in the list respectively: 0,1,5.
Print the content of your list.
Find out in the list the employees in the same department as the first employee on the list. Print them out.
Remove the first element of the list.
Remove the item at index 2.
Print the content of your list again.
 Java--- have the same eid. name (as a String)- The name

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!