Question: The MyString class must have the following private instance variables ( fields ) : a variable named capacity that will store an int a variable

The MyString class must have the following private instance variables (fields):
a variable named capacity that will store an int
a variable named length that will store an int
a variable named data that will store a char[](char array)
The MyString class must have the following public constructor methods:
a default constructor
an overloaded constructor with an int parameter
an overloaded constructor with a String parameter
The MyString class must have the following public methods:
a method named charAt. This method will have one parameter of type int. This method will return a char.
a method named concat. This method will have one parameter of type MyString. This method will return nothing.
a method named equals. This method will have one parameter of type MyString. This method will return a boolean.
a method named indexOf. This method will have one parameter of type MyString. This method will return an int.
a method named length. This method will have no parameters. This method will return an int.
a method named makeCapacity. This method will have one parameter of type int. This method will return nothing.
a method named store. This method will have one parameter of type MyString. this method will return nothing.
a method named store. This method will have one parameter of type String. this method will return nothing.
a method named substring. This method will have two parameters of type int. This method will return a MyString.
a method named toString. This method will have no parameters.

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 Programming Questions!