Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA PROGRAMMING IMPLEMENT THE FOLLOWING METHOD ( MUST BE RECURSIVE ) public static String generateRandomMnemonic(String digits) This method takes as input a String containing 0
JAVA PROGRAMMING
IMPLEMENT THE FOLLOWING METHOD (MUST BE RECURSIVE)
public static String generateRandomMnemonic(String digits)
This method takes as input a String containing 0 or more digits and returns a string which is a legal mnemonic for that string of digits (though not necessarily an actual word), chosen at random. If the String digits is empty or null, this function should return an empty string. For example, calling generateRandomhnemonic ("723) might return any of "PAD", "QBF", "QAE", or any of the other 36 possible Strings that can be generated by the letters associated with the numbers 7, 2 and 3 in that order. Please use the following function as a helper method: private static String getCode (char A) [ (A) return "ABC" return "DEF" return "GHI" return "JKL" return "MO" return "BORS": return "TUV return "WXYZ"; return witch { case 2 case 3 case 4 case 15 case '6 case '7 case 9 default
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