Create a Generic Linked List
source: Tino Duong, 2003
-
Description:
A linked list an abstract data structure that is used commonly within computer science.
Your job is to write a linked list library. If you design this linked list properly, you will be able to use it in future assignments very easily. (hint: one possible method is to use inheritance)
Requirements:
- Implement doubly linked-list library of your own.
- Design the linked list in such a way that you are able to reuse it (as a library) when ever you need it.
This means that the list should be able to take any value or object as a node. (Much like the java Vector).
- Make sure you can,
- Insert a node: from the front, back and middle
- Remove a node: from the front, back and middle
- Check to see if list is empty
- Keep track of the number of elements in the list
- write a program that uses at least two classes derived from this 'generic' list class
- these new classes should be sortable
- it should be possible to search for specific members in the derived lists
Concepts:
- Linked List
- Dynamic Memory Allocation
- Pointers
- Inheritance
- Classes - object oriented design