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. 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 thisStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started