Question: Please do in Java Go create a new Java project 1410_TextManipulation. It should include a new package called codingBat and a Java class called CodingBat.

 Please do in Java Go create a new Java project 1410_TextManipulation.

Please do in Java

Go create a new Java project 1410_TextManipulation. It should include a new package called codingBat and a Java class called CodingBat. Add a method called wordEnds to class CodingBat (no main method) Its signature should match the one specified in the wordEnds (Links to an external site.) CodingBat example. Don't implement the method yet; instead, return null. At this point, the class CodingBat should compile. Create a corresponding test class called CodingBatTest. Add 13 test methods that include jUnit tests corresponding to the 13 tests in CodingBat. Remember: each test method needs to include an assertion. When you are done, run the tests. They should all fail because the method wordEnds returns null instead of the expected result. Implement the method. Then run the tests again. At this point, all tests should pass.

Expected Run wordEnds("abcXY123XYijk", "XY") "c13i" nullx null x wordEnds("XY123XY", "XY") "13" wordEnds("XY1XY", "XY") "11" null X wordEnds("XYXY", "XY") "XY" null X null X wordEnds("XY", "XY") wordEnds("Hi", "XY") null X wordEnds("", "XY") null X null X wordEnds("abc1xyzlilj", "1") "cxziij" wordEnds("abcixyz1", "1") "cxz" null x null X wordEnds("abc1xyz11", "1") "cxz11" null X wordEnds("abc1xyzlabc", "abc") "11" null x wordEnds("abc1xyzlabc", "b") "acac" wordEnds("abclabclabc", "abc") - "1111" null x other tests Your progress graph for this

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!