Syllabus Template1 ABOUT - This assignment’s three main topics are:▪ Linked List which was a topic of CSC 220 or of a previous course not at SFSU. We reviewed and learned Data Structures.▪...

Instructions included in the pdf file


Syllabus Template 1 ABOUT - This assignment’s three main topics are: ▪ Linked List which was a topic of CSC 220 or of a previous course not at SFSU. We reviewed and learned Data Structures. ▪ Recursive Function which was also a topic of CSC 220 or of a previous course not at SFSU. ▪ Smart Pointers which we cover in detail in this course. ▪ Assignment 04-Preparation helped us study the C++ versions of Linked List (the Linked Bag) and of Recursive Function. The focus was on C++ syntax and advanced implementations. ▪ More help and sample code will be provided. Please start this assignment early. - All parts of this assignment are to be done in C++. PART A – Linked Bag. - Please change only files: LinkedBag340.cpp and Include.h, no other files. - We are to implement 8 small additional functions and 2 helper functions to the Linked Bag. - Our programs must produce identical output to the output in the 2 sample runs: Asmt04_Run1.txt and Asmt04_Run2.txt ▪ Our Test 9’s output must also be identical to the sample output excepts the random values. ▪ Our Test 9’s random values in our 2 sample runs’ output must be different. Descriptions of the 8 functions: 1. removeSecondNode340 deletes the second node in the Linked Bag. 2. addEnd340 inserts the new node at the end of the Linked Bag. 3. getCurrentSize340Iterative counts the number of nodes in the Linked Bag iteratively. 4. getCurrentSize340Recursive counts the number of nodes in the Linked Bag recursively. Use 1 helper function: getCurrentSize340RecursiveHelper. 5. IMMEDIATE RECURSION: getCurrentSize340RecursiveNoHelper counts the number of nodes in the Linked Bag recursively. This recursive function does not use any helper functions. 6. getFrequencyOf340Recursive recursively counts the number of times an entry appears in the Linked Bag. Use 1 helper function: getFrequencyOf340RecursiveHelper. 7. IMMEDIATE RECURSION: getFrequencyOf340RecursiveNoHelper recursively counts the number of times an entry appears in the Linked Bag. This recursive function does not use any helper functions. 8. removeRandom340 removes a random entry from the Linked Bag. Requirements: 2 PART B – Linked Bag, Smart Pointers Version. - Create a Smart Pointers version of our PART A’s Linked Bag: 1. Please create a copy of our entire PART A solution and name it: PartB_SmartPointers. 2. Then go through all the files, not just LinkedBag340.cpp, and use smart pointers properly where it is possible. 3. In our assignment report, list the file names and the line numbers in which we use smart pointers. For each smart pointer, explain in 5 or more sentences why it is a proper use. 4. This Smart Pointers version must work properly and produce identical output like that of our PART A version. 5. In addition, please update and add destructor(s) so that the program displays more information (in addition to the output required and described above) when object(s) get destroyed. 6. Please remember to submit our code of this part. Save the code under a folder named “PartB_SmartPointers” and include this folder in the assignment submission ZIP. Please remember to document this part in the assignment report. PART C – Linked Bag, Creativity. - Please create a copy of our entire PART B solution and name it: PartC_IamCreative - We need to add code to LinkedBag340.cpp and Include.h and write PartC.cpp to demonstrate how this new function works. - Requirements, this function shall: 1. Perform one meaningful task. Please use the first paragraph of at least 5 sentences in PART C to explain why it is a meaningful task. 2. Modify the LinkedBag’s content every time it runs. 3. Use Smart Pointers in its parameter list, in its implementation, and as return value(s).
Nov 18, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here