Question: I need help with this HW , Here's what it asked for, There's some lines of code That I have an idea I need to

I need help with this HW, Here's what it asked for, There's some lines of code That I have an idea I need to use, but if you can answer this with this criteria that will help a lot!:
In This HW, you will need to create the class called "MyText" that does text file manipulation. Here are the operations:
1.)One empty constrcutor and another is passed the name of the file
public MyText(){}
public MyText(string fileName){}
2.)Read and return the text file as a string
public string readTextFile()
3.)Find the occurrences of a substring in a file by returning a set containing the line numbers of where the substring is found
public List findSubString(string str)
4.)Return the line string by line number
public string getLine(int lineNumber)
5.)Return the line number where the first occurrence of the substring is found and the column
public int substringFirstFind(string substring, out int col)
6.)Add a substring to any given line at a given location
// Insert any text at any location in any selected line
// the method returns bool which indicates success or not
public bool insertSubstring(string str, int lineNumber, int col)
7.)Saving a copy of the original text file using a new fileName with any modificatoins from operation 6.
public bool saveCopy(string fileName)
Use only C#.
The class will have data members, there should be at least one called _fileName
You need to figure out the class variables you need to use (Hint: there should be at least one, take a look at the constructor)
You do not need to write the Main method.

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!