String Project 1

String Projects 2
Add the following Methods to a class called strTester
Method Header public String removeFirstChar(String str)
Description: Returns the String with the first letter removed. If the length of the String is less than 1 then it returns "".
Method Call   Return Value
removeFirstChar("abc") "bc"
removeFirstChar("hijddd") "ijddd"
removeFirstChar("a") ""
Method Header public int lenMinusTwo(String str)
Method Call   Return Value
lenMinusTwo("abc") 1
lenMinusTwo("abcd") 2
lenMinusTwo("a") 0


Method Header public int larger(String a,String b)
Description: Returns the length of the larger String. If both Strings have equal length, return -1;.
Method Call   Return Value
larger("abc","a") 3
larger("abcd","ab") 4
larger("a","") 1
larger("a","b") -1
Method Header public boolean isSameSize(String a, String b)
Description: Returns true if the length of String a is the same as the length of b.
Method Call   Return Value
isSameSize("ac","ab") true
isSameSize("b" , "ab") false
isSameSize("a", "abcjkfd") false
isSameSize("", "a") false
Method Header public String largerTwice(String a,String b)
Description: Returns the concatenation of the larger String. If both Strings have equal length, return "";.
Method Call   Return Value
largerTwice("abc","a") "abcabc"
largerTwice("abcd","ab") "abcdabcd"
largerTwice("a","") "aa"
largerTwice("a","b") ""
** Method Header public int middleSize(String a,String b, String C)
Description: Returns the length of the String with the middlemost length. If 2 Strings have equal length, return -1
Method Call   Return Value
middleSize("abc","ab","a") 2
middleSize("abcd","ac", "ab") -1
middleSize("a","a", "a") -1
Method Header public String join3Times(String a, String b)
Description: Returns the concatenation of the smaller String 3 times. If the two Strings have equal length return "same"
Method Call   Return Value
join3Times("xy","a") "aaa"
join3Times("abcd","xt") "xtxtxt"
join3Times("a","a") "same"
Method Header public String lenConcatStr(String str)
Description: Returns the concatenation of the length and the String itself;.
Method Call   Return Value
lenConcatStr("abc") "abc3"
lenConcatStr("ab") "ab2"
lenConcatStr("a") "a1"
lenConcatStr("") "0"