Question: write in c++ programming language Q #1. Apply concepts of Advanced Data Structures to implement a template class for array based list with following attributes

write in c++ programming language Q #1. Apply concepts of Advanced Datawrite in c++ programming language

Q #1. Apply concepts of Advanced Data Structures to implement a template class for array based list with following attributes and functionalities: template class ABlist private: int max_size; int actual_size; T* list array: public: ABList(int size): -ABList(); int getLength(); T getItem(int); void insertItem (I value); int findAndRemove Item(T); void displayList(); void Mergelist (ABlist); void Reduceto Half(); Constructor will dynamically allocate the list of size 'Size'. insertItem() function will insert new item at the end of the list, only if item is not present in the list already. If item is already present, it will display a message, Item already in the list. FindAndRemoveItem() will search an item in the list, if found, item will be removed from the list. If item is not found, function will return -1. Reduceto Half() will reduce the size of the List to half and copy all the items from the old list to the new list and destroy the old list. MergeLists() will combine two array based lists into one. In main(), define two array based lists of type String and size 10. Ask user to enter 5 names in each of the lists. Merge both the lists and display the resultant merged list on the screen

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!