Question: 1 of 2 Using the given project Strings, complete each section in the class YourCode by using the methods specified in each exercise (you may

 1 of 2 Using the given project Strings, complete each section
in the class YourCode by using the methods specified in each exercise

1 of 2 Using the given project Strings, complete each section in the class YourCode by using the methods specified in each exercise (you may declare additional variables). No need to ask the user to enter values; use the variables that are already declared in the method. The class Testing already has testing cases to test your code. You simply need to compile and execute either the main method or each section of this dass. Details about methods of the class String can be found in the String lecture slides. The method length0 requires no parameters and it returns the length of the string asan int. Folder name: A170 E21 Your LastName Your FirstName Part A. HALF ASTRING Given a string strl of even length, print out the first half. Methods to use: substring0, length() Testing cases: WooHoo Woo HelloThere Hello abcdef abc ab 0123456789 01234 kitten Part B. WITHOUT ENDS Given a string strl, print out the string without the first and last char. The string length is at least 2. Methods to use: substring0, length0 Testing cases: Hello java coding odin (empty string) Chocolate hocolate kitten itte woohoo

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!