Question: THIS IS JAVA PROGRAMMING... Objectives: 1. Apply UML design on user defined class 2. Write overloaded constructors of a class 3. Write customer methods of

THIS IS JAVA PROGRAMMING...

Objectives:

1. Apply UML design on user defined class

2. Write overloaded constructors of a class

3. Write customer methods of the class (Other than get and set methods)

QUESTION:

Write your own String class based on the following UML diagram. No built-in String, StringBuffer related classes are allowed.

MyString
-data: char[]

+MyString(chars: char[])

+charAt(i: int) : char

+length() : int

+substring(begin: int, end: int) : MyString

+toLowerCase() : MyString

+equals(other: MyString) : Boolean

+valueOf(i: int) : MyString

All methods have the same functionality as the corresponding methods in String class. You shall provide a main function to test all methods in MyString class.

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!