Question: Done in Java. Any help appreciated! Create a class named Lab3Exercises and Implement the following static methods (we will not use this class to instantiate

Done in Java. Any help appreciated!

Create a class named Lab3Exercises and Implement the following static methods (we will not use this class to instantiate objects) and write JUnit testswhen asked:

Done in Java. Any help appreciated! Create a class named Lab3Exercises and

b) public static String computeBothEnds (String input) i. Write a static Java method that takes several words (or an entire line) as input and computes a word by combining first and last letter of each word. For example, if the given words (or line is "Hello, my name is Fred A Frank Flintstone", then your method should return "HomyneisFdAAFkFe". Notice that the comma and space are not part of the output. Ignore other special characters too and make sure your program can process both uppercase and lowercase letters. Words with single letter will have same letter for first and last. If there are no characters in input, then return null. ii. Use the Scanner class to get the input. You may use a loop if needed. iii. Test your method from main for both cases when it returns characters from both ends and also when it returns a null. iv. Write appropriate Junit tests

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!