Question: Java Program AND JUnit TEST Returns a string that consists of all and only the characters in either the odd positions (i.e., first, third, fifth,

Java Program AND JUnit TEST

Returns a string that consists of all and only the characters in either the odd positions (i.e., first, third, fifth, and so on) or in the even positions (i.e., second, fourth, sixth, and so on) current string, in the same order and with the same case as in the current string. The first character in the string is considered to be in Position 1. * @param String to determine if odd or even characters are to be returned. * @return String made of characters in odd positions in the current string * @throws IllegalArgumentException if parameter is other than "odd" or "even"

String getEvenOrOddCharacters(String evenOrOdd);

/** * Replace all occurrences of a single zero (0) with the string "Go Rams" * in the current string, * and all occurrences of a double zero (00) with the string "CS@VCU" */ void ramifyString();

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!