Answered step by step
Verified Expert Solution
Question
1 Approved Answer
he end goal of this assignment is to create a class called RandomFunctionalities 2 which will include methods that nanipulate different data types. 1. Create
he end goal of this assignment is to create a class called RandomFunctionalities 2 which will include methods that nanipulate different data types. 1. Create a class called RandomFunctionalities 2 2. Create a method in RandomFunctionalties 2 called: public static String mixWords(String firstWord, String secondWord)\{ 1. The method should retum the first and second word mixed together 1. mixWords("bob","cat"); will return "bcoabt" , mixWords("put","together"); will return "ptuotgether", mixWords("double","up"); will return "duopuble", and mixWords("double","); will return "double". 2. keep in mind that either word can be an empty string 3. Create a method in RandomFunctionalities 2 called: public static String switcheroo(String word)] 1. The method should retum the word re-arranged by groups of three 2. Example: 1. switcheroo("george"); would return "eogger" 2. switcheroo("you"); would return "ouy" 3. switcheroo("garen"; would return "argen" 4. switcheroo("michelle") would return "icmelhle" 5. switcheroo("maya") would return "ayma" 6. switcheroo("to"); would return "to" 7. switcheroo("i"); would return "i" 8. switcheroo(" "in);; would return " " 4. Create a method in RandomFunctionalities 2 called: public static String longestSet(String word )0 1. The method should retum the longest set of characters that is repeated at both the beginning and end of a word without overlapping 2. Example: 1. longestSet("abcacccccccccccccccfabc") will retum "abc" 2. longestSet("aa") will return "a" 3. longestSet("aaa") will return "a" 4. longestSet("aaaa") will return "aa" 5. longestSet("garen") will retum " "u 5. Create another class called testingRandomFunctionalities 2 1. test all 3 methods with minimum 5 examples for each 2. examples should be different than my examples 6. Submit your two java files (randomFunctionalities2 and testingRandomFunctionalities2) 7. Submit a screenshot of the results for testingRandomFunctionalities 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started