Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with this project please, Topics: O0P, operator overloading, constructors (copy constructor, default constructor etc.), destructors, 'this pointer, friendship relation, and static variables. Total: 300

Help with this project please,

image text in transcribedimage text in transcribed

Topics: O0P, operator overloading, constructors (copy constructor, default constructor etc.), destructors, 'this pointer, friendship relation, and static variables. Total: 300 Points Project Title: String Class implementation. DO NOT USEINCLUDE string type (e.g. #include s2 returns true or false, s1[2] returns third char in string s1, sLLength0 returns length of s1 etc. Project Description: You are required to create your own String class (Note: String class is different than built in string class) like string type in C++. This class should include following operations: (10 Points) Separate specifications from implementation. Keep header file and class separate files. (20 Points) Can initialize created object with a given string or given instance of the same class (use copy constructor) (10 Points) Dynamically allocates memory for a given string (e.g. String s(Joe"); in this case allocates 3 memory spaces for String class instance s) (10Points) Returns string length if it is requested (e.g. sLength0) (10 Points) Clears dynamically allocated memory for String object while destructing (do it in destructor) (20 Points) Checks boundaries (e.g. if String s size is 10, s[11]- 'A; will display error message on screen) (20 Points) In public section of the String class only include interfaces. All other variables and functions must be in private

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 Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions