CS 340 - Machine Problem 4

Inheritance of Linear Data Structures

Due: Thursday 11/9/2006 at 11:59 pm

For this assignment, you must implement four linear data structure using linked lists in either C++ or Java. All four of these data structures are to be connected in some inheritance hierarchy. Therefore you are not allowed to create 4 complete separate data structures for this assignment. Any assignment doing this will receive a zero for the assignment.

The following shows the classes and methods that are to exist. You will most likely also need a Node class.

  1. a unordered list
  2. a sorted list in increasing order
  3. a queue
  4. a stack

The following is to clarify any of the operations.

User Interface

Your program is to maintain 4 different lists. The user gets to determine the type of each list (unordered, ordered, queue, stack). The user will then get to specify the operation to be performed on each list. The following are commands are to processed by your program. Note that the angle brackets (less-than and greater-than signs) are not placed around the values. To create list one as a queue the command is:
    c 1 q
not
    c <1> <q>

General Comments

Your program must be written in good programming style. This includes (but is not limited to) meaningful identifier names, a file header at the beginning of each source code file, a function header at the beginning of the function, proper use of blank lines and indentation to aide in the reading of your code, explanatory "value-added" in-line comments, etc.

The work you turn in must be 100% done by your own own. You are not allowed to share code with any other students (inside this class or not). You may discuss the project with other students; however, you may not show any code you write to another student nor may you look at any other student's written code.

You are to submit this using turnin on the CS Department machines with the project name of mp4. The turnin command would be

 turnin -c cs340 -p mp4 <filename(s)>
Where <filename(s)> would be the name of the file(s) you want to submit for grading. You can verify what you submitted by using the command:
 turnin -c cs340 -p mp4 -v