Assignment 6: A Linked List with a Tail Pointer (individual)

Assigned: 10/23
Due: 11/12 at 11:59 p.m.

Libraries You May Use

Description

You are to implement a custom version of the linked list class with both a head pointer and a tail pointer that stores the information of a list of employees.

What you must implement:

You will be implementing a linked list class named employeelist in employeelist.cpp and employeelist.h with both head and tail pointers. The node for an employee (we'll call it entry) should store the following data (in its node struct or class): You may define the node for your employeelist class in its own .h file or in the employeelist header. You should include a head pointer and a tail pointer for a linked list. You must also implement the following minimum functionality (methods): Note: In general your methods should not be interacting with the user directly by doing input/output from/to the user. Instead, your methods should pass information to the main() method and leave input/output to the main() method.

Data File Format

You should provide a data file for testing purposes. Your program should read and write the same file format (i.e., the file output of your program should be able to serve as your program's input). The format is as follows:

first_name1 last_name1
salary1
first_name2 last_name2
salary2
...
      
Where each entry has an appropriate value (e.g., first_namei may be John, last_namei may be Doe, and salaryi may be 3245.46.

As your program reads the file you should use insert_sorted to store the data in order (i.e., an unsorted file should get sorted by your program).

Documentation

Your program's documentation should be consistent with previous assignments (see previous assignments and examples for more information).

Driver

You are not being provided with a driver. Instead, you are asked to implement a driver that manages interaction with the user as well as the interaction with your simple linked list-based database. The driver should have a loop that gives the user the following choices:
Welcome to the UTM!  You may select one of the following options:
1 Read an employee list from a file
2 Write the employee list to a file
3 Print the employee list
4 Search for an employee's salary
5 Reverse lookup by a salary range
6 Add an employee
7 Delete an employee
8 Exit this program

Please enter your choice now: [user enters their choice here]
    
Note that this implies the use of a loop in your main() that allows the user to keep selecting from the list until they are done. Also note that your method behavior should be consistent, and should prevent against simple errors: printing an empty database to a file should result in an empty file, your program should be able to read back in a database that it has written to a file, etc.

What you must turn in.

Electronically a single zip file, with the name LASTNAME_FIRSTNAME.zip. Your zip file should extract into a directory with the same name as the zip (please make sure to put your files in a separate directory before submission). Your zip should include all files necessary to compile and run your program including:

Note: Your program must compile and run on CS1 (or a UD lab machine) or it will not be graded. Please see the syllabus for details.