Question: Create a class named StringPlayTester which only contains main(). In main, the user should be prompted to enter a string (I'll call it str). main()

Create a class named StringPlayTester which only contains main(). In main, the user should be prompted to enter a string (I'll call it str). main() will then call each method in StringPlay passing str as the formal parameter as summarized below:

boolean result1 = StringPlay.needsTrim(str);

String result2 = StringPlay.swap3For4(str);

boolean result3 = StringPlay.areHalvesEqual(str);

main() should output these 3 results with descriptive text. The user should then be prompted with "Run again (y/n)" and the program rerun if wanted.

For begginer, DO NOT use "break"

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!