The linked list class that you created in the last assignment can create and print lists, but there is no way to access specific elements in the list. the C++ paradigm for accessing elements in a list is with iterators.
The file list_test.cc contains a program that allows the user
to test using iterators to print and add elements to a doubly linked list.
For this assignment, add a nested class, Iterator
to your List
class from
the last assignment. The List
class will need the following new functions:
Begin
function should create and initialize an iterator with a current
node that is the first node in the list.End
function should create and initialize an iterator with a current
node that is the last node in the list.Add
function should add the specified
object before the current node of the specified iterator.The Iterator
class will need the following functions:
Be sure to test your code on multiple examples and on the cs server.
Tar your code in a file that contains your name and submit it on course Inquire site.