Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

2. What is the business value of security and control?

Answered: 1 week ago