restone.blogg.se

Cop4530 wordify github
Cop4530 wordify github









cop4530 wordify github

List(int num, const T & val = T()): Construct a list with num elements, all initialized with value val. Create the new list using elements in existing list rhs. Call init() to initialize list member variables. List(): Default zero-parameter constructor. We describe the requirements of each function in the following. It is OK for you to use the code provided in the textbook. They do not store any real elements in the list. They represent the beginning and end markers. The head and tail pointers point to the sentinel nodes. theSize records the number of elements in the list. It has three member variables, theSize, head, and tail. The design of the List container follows the one presented in the textbook. You need to implement all the member functions of List, List::iterator, and List::const_iterator, and non-class global overloaded functions operator=(), operator!=(), and operator<<() included in List.h. As we have discussed in class, you should not try to compile List.cpp (or List.h). Note that, List.cpp has been included in the header file List.h (towards the end of the file). You need to implement the member functions of the doubly-linked list class template List in a file named List.cpp. Similarly, you cannot change anything in the test_list.cpp file. It is used to test your implementation of the doubly-linked list class template for different data types (it tests List and List.

Cop4530 wordify github driver#

You cannot change anything in the List.h file.Ī driver program test_list.cpp has been included. In particular, it contains a nested Node structure, and two nested iterators class (iterator and const_iterator).

cop4530 wordify github

Statement of Work: Implement a doubly-linked list class template List and its associated iteratorsĪ header file List.h is provided, which contains the interfaces of the doubly-linked list class template List. Getting familiar with the concept of class template and its usage. Educational Objectives: Understanding generic programming and information hiding by developing generic containers.











Cop4530 wordify github