Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a single linked list class named SLList that provides the following methods: void add( E item ) Add item at the tail of the

Create a single linked list class named SLList that provides the following methods:

void add( E item )

Add item at the tail of the list

E get( int index )

Return object E at position index in list

If index out of bounds, return null

int indexOf( E target )

Return index of target in the linked list

If found, return the index (relative 0)

If not found, return -1

int size()

Return number of items in list

You will need the appropriate constructors. In addition, you may also implement other methods that may be useful for the assignment. Thoroughly test all of the methods with a simple test class before using the linked list to complete the assignment. Once the SLList class has been successfully tested, proceed with developing the application below.

Develop a menu-driven system that maintains a list of employees. Name the client program Prog3.java and the menu class EmpMenu.java. The program should begin by calling the EmpMenu class constructor which will load the linked list. The constructor will read the employee.txt file, create an Employee object for each record in the file, and load the Employee object into the SLList single linked list. The program will continue by displaying a menu for the user.

employee.txt file: CSV (comma separated value) text file in which each line in the file represents an employee. The comma delimited fields are:

Fields

Description

Employee ID

string

First Name

string

Last Name

string

Salary

double

A menu will then be displayed, allowing the user the following options:

1. Display

Display all employees in list in easy to read tabular format

2. Add employee

Get employee information from user and add to tail of list

3. Find employee

Get employee ID from user

If found, display employee information in easy to read format

If not found, display message

0. Exit

Do I really need to explain this???

After performing the appropriate action, display a new menu and repeat until user selects the exit option.

Requirements

  • Your source code should abide by the Java programming standards for the course.
  • Your source code should be documented using Javadoc style according to the course standards.
  • Use the default package in your project; do not specify a package in your code.
  • Use any file and class names specified in the assignment.
  • Your test program must be named Prog3.
CSV file 123, Beau, Vine, 142500 882, Bjorn, Free, 65000 495, Pete, Zah, 102468.2 246, Win E., De Poo, 68123 222, Moe, Skeeto, 12789.8 987, Jed I., Knight, 1000000.01 164, Teddy, Baer, 42500 248, Allie, Gator, 65000 812, Sally, Mander, 53000 973, Amy, Asparagus, 83768.95 542, Charles, Cucumber, 36900 092, Zachary, Zucchini, 120000.52 764, Otto, Orange, 32589.5 249, Ellen, Endive, 101050 896, Fred, Fennel, 56874.05 200, Rita, Rutabaga, 9876.2 642, Gregory, Grape, 61200 384, Paula, Pear, 62100 628, Susan, Squash, 58400.32 136, Henry, Huckleberry,41234.5 824, Tom, Tomato, 83768.95

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

Step: 3

blur-text-image

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago