Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions