Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make sure the following requirements are met. Program must compile and run. Create an ADT character string as a class (LinkedChar is name I am

Make sure the following requirements are met.

  • Program must compile and run.
  • Create an ADT character string as a class (LinkedChar is name I am using) 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
    • Test if another LinkedChar is submatch of this LinkedChar
    • Quit
    • use getline()
    • C++ code

Example UML Class Diagram (missing attributes)

LinkedChar

LinkedChar();

LinkedChar(const std::string s);

int length() const;

int index(char ch) const; // -1 if no match

void append(const LinkedChar& lc);

bool submatch(const LinkedChar& lc) 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

Step: 3

blur-text-image

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

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions