Question: HELP WITH THAT PLEASE C++ Description This assignment builds on Assignment 1 so you need to make sure you have a working version to upgrade
HELP WITH THAT PLEASE C++
Description This assignment builds on Assignment 1 so you need to make sure you have a working version to upgrade with features needed for Assignment 2. This assignment requires adding destructors and copy constructor, binary search, selection sort by title (using a function object) and adding a couple methods to the driver to adjust chartpositions when insertions and deletions are done. Students are expected to use the given resources for C++ reference and complete the practice lab before embarking on the assignment. Implement and add these methods to the code for Assignment 1 Scan your template to find //TODO and implement the code needed //copy constructor VectorADT(const VectorADT & other); //destructor ~VectorADT(); // sort according to title - use function objects - selection sort int sortTitleEqual
# The driver is given VectorADTMain.cpp is given to you that does the following 1. Create a database of Songs called SongsData 2. Populate this database from the file SongsData.txt using push_back method 3. Sorts this database using Selection Sort with chart position as key ## Please Note the number of steps taken for this sort 4. Uses a function object from the LessThan class for sorting as above 5. Records the number of steps taken for this sort 6. Push_back and pop_back a new Song. Records the changing size of database 7. Inserts a song at index position 5. Observe successful insertion. ## Please Note the number of steps taken for this command. 8. Calls adjustInsert method to adjust chartpositions after insert //TODO 9. Remove the song from index position 4. Observes successful removal. ## Please Note the number of steps taken for this command. 10. Calls adjustRemove method to adjust chartpositions after insert //TODO 11. Create a backup of this database 12.Sort the backup using Selection sort using title as key 13.Use the LessThanEqual functor for this ## Please Note the number of steps taken for this sort 14.Search for removed song by title Record the number of steps taken for this using binary search See if this song is found ## Note the number of steps taken for this command 15. Search for inserted song by title using binary search See if this song is found ## Note the number of steps taken for this command 16.Search for last song of the database by title using binary search See if this song is found ## Note the number of steps taken for this command Run the program again with the larger database
(worth 5 points) Reflection: Write a brief reflection after running the program with both data files and classify (## from above the number of steps) the complexity class (Big O notation) of the selection sort, linear search, push_back,pop_back(), insert and remove functions. Use N to stand for the size of the data Array. So explain what happens when N changes to 2*N? (the larger database). Has binary search improved the run time efficiency of the program? Do you think as N increases greatly, binary search is still a good option? Why? Todo List: Use the templates given to you. You are given the header file, LessThan class for creating function objects, and other pieces of code. You are not obliged to use my template. You may modify it as needed. for Code marked GIVEN CODE is given to you for free You are also given a makefile if needed Comments marked //TODO indicated you need to fill in code. These templates are a guide and you may tweak them if needed Run and test the project for edge cases, average and load cases Your output must exactly match the output.txt given to you You may run the program on the college server, OR on your Personal platform (Visual Studio, Xcode, Replit) Take screen shots of the output, paste them into a MS word file or direct your output to a textfile and copy this into your document
Submission Format Zip all code and data files into A2w123456.zip. Include data files and all cpp and headerfiles. DO NOT ZIP the DOCUMENT file. You will get ZERO credit if you zip the document file with the code files. Call the document file A2OUTPUTw123446.docx
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
