Question: Using UML diagram and pseudocode, design an ADT character string by using a linked chain of characters. Include typical operations such as finding its length,

Using UML diagram and pseudocode, design 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. Create a C++ solution that implements the design in above:

a. Node .h header file that defines all the classes in question.

b. Node .cpp file that implements all the classes in question.

c. NodeMain.cpp driver program with a main() function that uses and tests these two classes

Try to test these two items: String and integer

can somebody help to do it with node and all polymorphism and inheritance

you can find UML diagram here: https://www.chegg.com/homework-help/questions-and-answers/c-question-using-uml-diagram-design-adt-chain-using-linked-chain-nodes-generic-item-type-t-q26629501

Pseudocode

/** @file Node.h

#ifndef NODE_

#define NODE_

template

class Node

{

private:

ItemType item; // A data item

Node* next; // Pointer to next node

public:

Node();

Node(const ItemType& anItem);

Node(const ItemType& anItem, Node* nextNodePtr);

void setItem(const ItemType& anItem);

void setNext(Node* nextNodePtr);

ItemType getItem() const ;

Node* getNext() const ;

}; // end Node

#endif

----------------------------------------

/** @file Node.cpp

Listing 4-2 */

#include "Node.h"

#include

template

Node::Node() : next(nullptr)

{

} // end default constructor

template

Node::Node(const ItemType& anItem) : item(anItem), next(nullptr)

{

} // end constructor

template

Node::Node(const ItemType& anItem, Node* nextNodePtr) :

item(anItem), next(nextNodePtr)

{

} // end constructor

template

void Node::setItem(const ItemType& anItem)

{

item = anItem;

} // end setItem

template

void Node::setNext(Node* nextNodePtr)

{

next = nextNodePtr;

} // end setNext

template

ItemType Node::getItem() const

{

return item;

} // end getItem

template

Node* Node::getNext() const

{

return next;

} // end getNext

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!