Instructions Overview We have been working on replicating the immutable Java String class (MyString class). In this assignment, you will provide two different versions that replicate the mutable Java StringBuilder class. Both classes will provide all the methods specified by the MyStringBuilder interface, including the length, charAt, and toString methods supported by the MyString class we implemented in class. Both classes will add a constructor that takes a MyString object as a parameter. Additionally, they will implement the attached MyStringBuilder interface. MyStringBuilderArray class You can start the MyStringBuilderArray class which inherits from the MyString class we've been working on in class. Make the instance variable characters in the parent class (MyString) from private to protected to facilitate the access to the variable in the child class (MyStringBuilderArray). Complete the implementation of all the methods appropriately. MyStringBuilderList class You can start the MyStringBuilderList class from scratch, and make sure that it implements the MyStringBuilder interface. Unlike MyStringBuilderArray class, MyStringBuilderList class will use a List object as an instance variable to store characters. Complete the implementation of all the methods appropriately. Test program Write a Java program MyStringBuilderTest to test your classes from above according. Good test programs will test edge cases as well as if proper exceptions are thrown in case of errors. Make sure you call all the methods you implemented and comment what the expected outcomes are for each method call. Starting Point Download and add the MyStringBuilder interface to our existing MyString Java project. Create the new classes: MyStringBuilderArray and MyStringBuilderList according to the specifications above. Complete all the methods to perform the necessary operations. Requirements You should use classes, objects, methods, inheritance, and interface appropriately. Make sure that you document classes and functions (JavaDoc documentation style) Make sure that all your instance variables are private. (unless specified otherwise)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Instructions

Overview

We have been working on replicating the immutable Java String class (MyString class). In this assignment, you will provide two different versions that replicate the mutable Java StringBuilder class. Both classes will provide all the methods specified by the MyStringBuilder interface, including the length, charAt, and toString methods supported by the MyString class we implemented in class. Both classes will add a constructor that takes a MyString object as a parameter. Additionally, they will implement the attached MyStringBuilder interface.

MyStringBuilderArray class

You can start the MyStringBuilderArray class which inherits from the MyString class we've been working on in class. Make the instance variable characters in the parent class (MyString) from private to protected to facilitate the access to the variable in the child class (MyStringBuilderArray).

Complete the implementation of all the methods appropriately.

MyStringBuilderList class

You can start the MyStringBuilderList class from scratch, and make sure that it implements the MyStringBuilder interface. Unlike MyStringBuilderArray class, MyStringBuilderList class will use a List object as an instance variable to store characters.

Complete the implementation of all the methods appropriately.

Test program

Write a Java program MyStringBuilderTest to test your classes from above according. Good test programs will test edge cases as well as if proper exceptions are thrown in case of errors. Make sure you call all the methods you implemented and comment what the expected outcomes are for each method call.

Starting Point

  1. Download and add the MyStringBuilder interface to our existing MyString Java project.
  2. Create the new classes: MyStringBuilderArray and MyStringBuilderList according to the specifications above.
  3. Complete all the methods to perform the necessary operations.

Requirements

  • You should use classes, objects, methods, inheritance, and interface appropriately.
  • Make sure that you document classes and functions (JavaDoc documentation style)
  • Make sure that all your instance variables are private. (unless specified otherwise)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education