Question: 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)

JAVA PROGRAMMING IMPLEMENT THE FOLLOWING METHOD (MUST BE RECURSIVE) public static String

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

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!