Description
CSCI231 Project 10 MyString Class focuses on Java object-oriented programming and implementing a custom string class using character arrays. This Chapter 10 assignment requires students to apply UML class design, constructors, and custom methods for character access, string length, substring extraction, lowercase conversion, equality comparison, and integer conversion without using built-in String or StringBuffer classes.
Assignment Description
Purpose: The purpose for this project is to reinforce the knowledge from Chapter 10 of the textbook.
The students will learn how to write a user defined class.
Project 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)
Problem description:
The String class is provided by java library. 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.
Due date will be announced on Blackboard.
Solution Overview
The Java implementation covers a UML-defined MyString class backed by a character array, including charAt(), length(), substring(), toLowerCase(), equals(), and valueOf() methods. A main method tests the required functionality without relying on built-in String or StringBuffer classes.

