Question: 1 . Add a method named problem 1 that keeps asking the user for words and joins them together. Each word should start with an

1. Add a method named problem1 that keeps asking the user for words and joins them together. Each word should start with an uppercase letter and the rest of letters in the word should be lowercase. All the words should be separated by a space. When the user decides to stop, return the joined string. (10 pts)2. Add a method named problem2 that asks the user for a string. Count and return the frequency of letter A. The letters are not case-sensitive, so for example, you should treat A and a as the same letter. (10 pts)3. Add a method named problem3 that accepts a string and reverses it by manipulating indices. (10 pts)4. Add a method named problem4 to remove the 10-th index character from the given string and return the result. If 10 is an invalid index, return an error message. (10 pts)5. Add a method named problem5 that accepts an adjective, forms an adverb from the adjective, and returns the adverb. In most cases, an adverb is formed by adding -ly to an adjective. For example, quick quickly If the adjective ends in -y, replace the y with i and add -ly. For example, easy easily If the adjective ends in -able, -ible, or -le, replace the -e with -y. For example, gentle gently If the adjective ends in -ic, add -ally. For example, basic basically. (10 pts) import java.util.Arrays Only the Arrays class is allowed to solve the following problems: 6. Add a method named problem6 that accepts an array of integer values. Find and remove all the duplicate values. Return the result. Test case: the given integer array is {2,3,1,4,1,2,4,2,1,4,2,3}, return {2,3,14}7. Add a method named problem7 that accepts an array of String values. Find and remove all the duplicate string literals. The string literals are not case-sensitive, so for example, you should treat apple and APPLE as the same string. Return the result. Test case: the given string array is {apple,Apple,banana,APPLE}, return {apple,banana}8. Add a method named problem8 that accepts two arrays of string values. Find and common elements. You may assume each array contains unique elements. Return the result. Test case: array1 is {banana,apple,orange}, array2 is {apple,strawberry,watermelon,banana}, return {banana,apple}.9. Add a method named problem9 that accepts two arrays of integer values. Find the elements that only appear in one of the arrays. You may assume each array contains unique elements. Return the result. Test case: array1 is {1,4,3,2,5}, array2 is {7,5,4,6}, return {1,3,2,7,6}.10. Add a method named problem10 that accepts an array of integers. Move all 0's to the end of an array if any. Give two references, start and end, to initially point at the first and last elements in the array. Page |1 Swap the elements at start and end if necessary. Make them gradually meet in the middle. Return the result. Test case: array1 is {2,0,0,1,3,1,3,0,2,0}, return {2,2,3,1,3,1,0,0,0,0}. Create the main method and run each method with the test case.

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 Programming Questions!