1.  Create a String2 class. a

timer Asked: Jan 20th, 2016

Question description

1.  Create a String2 class. a.  Write a method that will let you add a String to the class (change the String in the private area) public void addString(String na) b.  Write a method that will print out your String public void print() c.  Write a method that will cut out a piece of a string (if it is inside of String) For example if String was  Thompson and I wanted to cut out hom the String in the private area would become Tpson If the string to be cut out is not inside of the String there will be no change Use your indexOf command and then concatenation public void cut(String s)  // will cut s out of the String in private area if s is contained in it. d.   public void Reverse()  // will reverse String in private area // so if string is  Thomas  it will become  samohT // don’t just print it in reverse – change it there e.  public void removeVowels()  //  removes vowels // precondition : all characters are lower case // if String was “helium”  it would become “hlm”

Tutor Answer

(Top Tutor) Studypool Tutor
School: University of Virginia
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors