Question: using c++ please use the simpliest logic and the simpliest code possible! Design and implement an ADT StringList that represents a string by using a

Design and implement an ADT StringList that represents a string by using a linked chain of characters. All your strings will be allocated on the heap. Include the following constructors and functions: //The parametrized constructor will take a std:sstring type //and construct a String Linked List from that object StringList(const std::string str); //The function calculates the length of the String Linked List //It doesn't count the nuIl at the end int StringList: :getSize() const: //The function converts the object into a std:string built-in data type std::string StringList::toString() const; //The function returns the index of the first occurrence of a character in //the String Linked List int StringList::indexof(char c) const; //The function returns the character at a particular index in the String Linked //List char StringList::getChar(int index) const; //The function inserts a character at a particular index in the String Linked //List void StringList::insertAt(int index, char c) const; //The function prints the String Linked List by traversing it void StringList::printList() const; //The overridden operator appends the passed string to the end of the object's //StringList StringList StringList: :operator+(const std::string \& \&rhs) const: An example for calling the constructor new StringList( "ABCDABC" ) would produce a String Linked List as follows: ABCBBC Your main function should accept command line input of the following format and invoke the appropriate function accordingly: Enter a string: ABDGJATDJAdagfq 12fd Enter a command: Size 19 indexor A 0 indexor a 11 printlist A>B>D>G>J>A>T>D>J>A>d>a>g>f>q>1>2>f>d+a123bA>B>D>G>J>A>T>D>J>A>d>a>g>f>q>1>2>f>d>a>1>2>3>b printList ABDGJATDJAdagfq12fda.123b A>B>D>G>J>A>T>D>J>A>d>a>g>f>q>1>2>f>d>a>1>2>3>binsertAt4bA>B>D>G>b>J>A>T>D>J>A>d>a>g>f>q>1>2>f>d>a>1>2>3>b getchar 1 B tostring ABDGbJATDJAdagfq12fda123b getsize 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
