Question: Create a double linked list class in java with a tail pointer named DLList that implements 2 iterators (forward and backward) and provides the following
Create a double linked list class in java with a tail pointer named DLList that implements 2 iterators (forward and backward) and provides the following methods:
void add( E item ) Adds item at the tail of the list
E get( int index ) Returns object E at position index in list
If index out of bounds, return null
int indexOf( E item ) Returns index of item in the list
void remove( int index ) Removes the item at position index in list
int size() Returns number of items in list
The DLList should provide two iterators: one that traverses in order and another in reverse order. Thoroughly test all of the methods of the DLList with a simple test class (such as a String) before using the linked list to complete the assignment. Once the DLList class has been successfully tested, proceed with developing the application below.
Develop a client program Prog3.java that maintains a list of employees. The program should begin by reading the employee.txt file, creating an Employee object, and storing the Employee objects in a DLList data structure.
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
Note: Print titles to separate the printout of each step above to make it easier to read. 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.
Employee.txt:
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
Get step-by-step solutions from verified subject matter experts
