Question: undefined Assignment #2: ADT List implemented as a Linked List Assignment due with Brightspace at 11:50pm on Wednesday January 27 Read in the textbook chapters

undefined Assignment #2: ADT List implemented as a Linked List Assignment duewith Brightspace at 11:50pm on Wednesday January 27 Read in the textbookchapters 1 (skip $1.3, $1.5), chapter 5 (skip $5.9) and chapter 3.undefined

Assignment #2: ADT List implemented as a Linked List Assignment due with Brightspace at 11:50pm on Wednesday January 27 Read in the textbook chapters 1 (skip $1.3, $1.5), chapter 5 (skip $5.9) and chapter 3. The purpose of this assignment is to write an ADT list to implement this ADT list as a C++ class that manipulates a singly linked list. to implement many functions of the class recursively (to practice programming singly linked lists) In this assignment, we are not focusing on the extra stack space used when programming recursively nor on the speed of the operations because the functions are recursive (but do not make the functions quadratic when they could be linear!). The C++ class LList must use the interface provided in LList.h. Do not modify the given (public) interface code of the class definition (except for possibly adding to that public interface though it is unlikely that you will need to in order to finish the assignment properly). Add code to the 'private part of the class definition in LList.h without modifying the private struct Node and add a private instance variable (or more). Follow the directives CPSC2150 Implement the LList class using a singly linked list. Implement a proper C++ class in the files LList.h and LList.cpp. Do not use the STL, except for the std::string. Defined LList::SEP as a blank (which could be represented as a string). Give the static constant NOT_DEFINED an appropriate value. Put a comment why you chose that value. The value NOT_DEFINED is returned by the function first and last if there is no first element or last element in the list. Implement the copy constructor, the destructor and the overload assignment operator (you do not need to implement the move constructor nor the move assignment operator). Use nullptr to indicate the empty list (do not use NULL). To submit as Assignment #2 as a single compressed file 1. LList.h (add YOUR code) 2. LList.cpp (add YOUR code) 3. LList_unittest.cpp (add more tests for bonus marks) 4. Makefile (provided do not modify) 5. test_LList.cpp (leave as is or add more code: it will not be marked) 6. A README.txt if needed For up to 20% bonus marks, write more tests in the file LList_unittest.cpp. You must put in the README.txt that you implemented the bonus and you must list the tests that you added. splice: Example of how splice works (the definition is consistent with Javascript's splice) Before the call, x = [ 11 22 66 77 ] and y = [ 33 44 55 ] x.splice(y, 2); will cause the transfer of the elements of the list y to be placed at the 2nd position of the list x (having started with the oth position). After the call, x = [11 22 33 44 55 66 77 ] and y = [] Clarification: A linked list is not a Java list a which is An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list." In this assignment LList does not have indices. We only use an index in splice to give the position to mimic part of the Javascript splice. Bibliography: Partly based on the Drozdek textbook, section 3.10 Exercises on page 125. Assignment #2: ADT List implemented as a Linked List Assignment due with Brightspace at 11:50pm on Wednesday January 27 Read in the textbook chapters 1 (skip $1.3, $1.5), chapter 5 (skip $5.9) and chapter 3. The purpose of this assignment is to write an ADT list to implement this ADT list as a C++ class that manipulates a singly linked list. to implement many functions of the class recursively (to practice programming singly linked lists) In this assignment, we are not focusing on the extra stack space used when programming recursively nor on the speed of the operations because the functions are recursive (but do not make the functions quadratic when they could be linear!). The C++ class LList must use the interface provided in LList.h. Do not modify the given (public) interface code of the class definition (except for possibly adding to that public interface though it is unlikely that you will need to in order to finish the assignment properly). Add code to the 'private part of the class definition in LList.h without modifying the private struct Node and add a private instance variable (or more). Follow the directives CPSC2150 Implement the LList class using a singly linked list. Implement a proper C++ class in the files LList.h and LList.cpp. Do not use the STL, except for the std::string. Defined LList::SEP as a blank (which could be represented as a string). Give the static constant NOT_DEFINED an appropriate value. Put a comment why you chose that value. The value NOT_DEFINED is returned by the function first and last if there is no first element or last element in the list. Implement the copy constructor, the destructor and the overload assignment operator (you do not need to implement the move constructor nor the move assignment operator). Use nullptr to indicate the empty list (do not use NULL). To submit as Assignment #2 as a single compressed file 1. LList.h (add YOUR code) 2. LList.cpp (add YOUR code) 3. LList_unittest.cpp (add more tests for bonus marks) 4. Makefile (provided do not modify) 5. test_LList.cpp (leave as is or add more code: it will not be marked) 6. A README.txt if needed For up to 20% bonus marks, write more tests in the file LList_unittest.cpp. You must put in the README.txt that you implemented the bonus and you must list the tests that you added. splice: Example of how splice works (the definition is consistent with Javascript's splice) Before the call, x = [ 11 22 66 77 ] and y = [ 33 44 55 ] x.splice(y, 2); will cause the transfer of the elements of the list y to be placed at the 2nd position of the list x (having started with the oth position). After the call, x = [11 22 33 44 55 66 77 ] and y = [] Clarification: A linked list is not a Java list a which is An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list." In this assignment LList does not have indices. We only use an index in splice to give the position to mimic part of the Javascript splice. Bibliography: Partly based on the Drozdek textbook, section 3.10 Exercises on page 125

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!