Question: read in a string from the console, convert it into an instance of MyString implemented now as a singly linked list of characters, and re
read in a string from the console, convert it into an instance of MyString implemented now as a singly linked list of characters, and reimplement a subset of the standard stringPage of RequirementsComplete the MyString class that is partially defined below.public class MyString : ICloneable, Comparable private class Node public char item; public Node next; Constructor markpublic Node private Node front; private int length; Reference to the first header node Number of characters Initialize an instance of MyString based on the given character array A markspublic MyString char A Create and return a clone of the current instance markspublic object Clone Compare the current instance of MyString with obj and return a or if the current string comes before, at or after obj in alphabetical order markspublic int CompareToobject obj Return the index of the first occurrence of c; otherwise return markspublic int IndexOfchar c Remove all occurrences of c markspublic void Remove char c Return true if obj is both of type MyString and the same as the current instance; otherwise return false marks Hint: Use CompareTopublic override bool Equals object obj Print the current instance of MyString markspublic void PrintThe main program will present a list of options to the user that exercises each of the methods above. To display and allow the user to choose among multiple instances of MyString, store the instances of MyString in an instance of List. For a bonus marks, keep the list in alphabetical order.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
