Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Specify and implement an ADT character string by using a linked chain of characters. Include typical operations such as finding its length, appending one string

Specify and implement an ADT character string by using a linked chain of characters. Include typical operations such as finding its length, appending one string to another, finding the index of the leftmost occurrence of a character in a string, and testing whether one string is a substring of another.

Program must compile and run. Create an ADT character string as a class that uses a linked list of each character. Do not use any STL container for the internal data structure. The LinkedChar class minimally has the methods in the UML diagram below. You can add more methods. Main function will have a menu of options. Enter new string and store as linked list of characters in an ADT LinkedChar class Get current length (number of characters stored) from the LinkedChar Find index of character in this LinkedChar Append another LinkedChar to this LinkedChar (no shallow copy) Test if another LinkedChar is submatch of this LinkedChar Quitimage text in transcribed

LinkedChar LinkedChar(); LinkedChar(const std::string s); int length() const; int index(char ch) const; // -1 if no match void append(const LinkedChar& Ic); bool submatch(const LinkedChar& Ic) const; LinkedChar LinkedChar(); LinkedChar(const std::string s); int length() const; int index(char ch) const; // -1 if no match void append(const LinkedChar& Ic); bool submatch(const LinkedChar& Ic) const

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

What is the confidence level associated with a confidence interval?

Answered: 1 week ago

Question

What are HR ethics?

Answered: 1 week ago

Question

What does corporate sustainability mean?

Answered: 1 week ago