Question
Consider the following list of employees at a company. We wish to place this data into a set of objects of the class Employee. (In
Consider the following list of employees at a company. We wish to place this data into a set of objects of the class Employee. (In java)
Emp_ID | Last_Name | Salary |
101 | Harris | $53,000 |
110 | Smith | $107,000 |
112 | Jones | $63,500 |
114 | Smith | $42,500 |
118 | Wilson | $89,000 |
123 | Abrams | $92,000 |
In order to easily manage the list, we need to create a linked list that orders the employees by Emp_ID. The class LinkedElement has been provided. You are given the challenge to create your own LinkedList class meeting the interface supplied on Blackboard.
Create a ListMain class with a main routine to:
1) Places the data into six separate Employee objects and creates a linked list to organize the objects.
2) Prints out the last name of the employee with the highest salary.
3) Removes Employee 101.
4) Tells whether there is an employee with Emp_ID 123 and gives the last name if there is.
5) Tells whether there is an employee with Emp_ID 101 and gives the last name if there is.
6) Print out the last names of the all of the current employees.
====================================
public class Employee { public Employee(String id, String name, double pay) { empID = id; lastName = name; salary = pay; } public String getID() { return empID; } public String getName() { return lastName; } public double getSalary() { return salary; } private String empID; private String lastName; private double salary; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started