Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in C++ please with comments to understand steps In this assignment you need to write a String Class. That's it! Piece of cake. You

Code in C++ please with comments to understand steps

image text in transcribed

image text in transcribed

image text in transcribed

In this assignment you need to write a String Class. That's it! Piece of cake. You can only use dynamic arrays of characters for this assignment. No strings! Your string class should allow for the following operations. You will overload the operators accordingly. To get full points you have to overload the following operators to do as follows Sample Code: String A "Potatoe"; String B "are String C-"Easy" String D; String E- "otat" +(Concatenation): Grarmmar B: Ae s-> A-> B-> A-> +'A-> +'B-> +' A-> +' B-> +' E +" D-C+A Should store in D- "EasyPotatoe It should work the same way concatenation works with C+'s normal string datatype -(Subtraction): D-A-E Should store in D - "Poe" Subtraction should remove the first instance (left to right) of that combination of letters. So if we had "Banana" and we are subtracting "ana" from it the resulting string would be "Bna" and NOT "Ban Another example if we had "Banana" and we were subtracting "a" from it we would get "Bnana". Note that we will not deal with negative strings so if givenA-E, IfE>A then return A. * (Multiplication) - *, *, In this assignment you need to write a String Class. That's it! Piece of cake. You can only use dynamic arrays of characters for this assignment. No strings! Your string class should allow for the following operations. You will overload the operators accordingly. To get full points you have to overload the following operators to do as follows Sample Code: String A "Potatoe"; String B "are String C-"Easy" String D; String E- "otat" +(Concatenation): Grarmmar B: Ae s-> A-> B-> A-> +'A-> +'B-> +' A-> +' B-> +' E +" D-C+A Should store in D- "EasyPotatoe It should work the same way concatenation works with C+'s normal string datatype -(Subtraction): D-A-E Should store in D - "Poe" Subtraction should remove the first instance (left to right) of that combination of letters. So if we had "Banana" and we are subtracting "ana" from it the resulting string would be "Bna" and NOT "Ban Another example if we had "Banana" and we were subtracting "a" from it we would get "Bnana". Note that we will not deal with negative strings so if givenA-E, IfE>A then return A. * (Multiplication) - *, *,

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

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions

Question

Give two probability rules for sample points?

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago