Lab 3

Due Friday, 2/12 - 11:59pm

    1. Implement a method that takes as input a reference to a sorted array of String objects, an integer representing the number of valid String objects contained in the array, and a new String object to be inserted into the array. The method will insert the new String object at the appropriate location and resize the array if necessary. The method returns a reference to the new array. The signature of the method follows:
      • public String[] insertSorted(String[] stringlist, int numstrings, String newstring);
    2. Implement a program that provides search-and-replace functionality. Allow the user to specify a search term, a replace term, and a file name. Open the file, replace all instances of the search term with the replace term and save the result to a new file. You may choose the name of the new file.

Submission

Please submit your work in an SVN directory https://www.cs.usfca.edu/svn/<username>/cs112/lab3.

Submission Instructions