Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class (to be named String), which will hold a string of characters (internal data representation is up to you). The member data elements

Create a class (to be named String), which will hold a string of characters (internal data representation is up to you). The member data elements should be private with public member functions to handle the following operations: Constructors - one with no parameters to initialize the class to empty; one with a pointer to a C type string as a parameter to initialize the class to contain a copy of that string; and one with a parameter that is of class String to initialize to a copy of that value. Comparison function (Compare) to allow the comparison of the String object to another String object or to a C type string.Concatenation function (Concat) to allow concatenation of the String object to another and to allow concatenation of the String object to a C type string.Copy function (Copy) to copy another String object into this one or copy a C type string into this object. Display function (Display) to display the characters in the String object. Length function (Len) to return the number of characters stored in the String object. An electronic copy of the .cpp and .h files in the project folder as created by Visual Studio.

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

Students also viewed these Databases questions

Question

What is focal length? Explain with a diagram and give an example.

Answered: 1 week ago

Question

What is physics and how does it apply in daily life?

Answered: 1 week ago