how to code a java program using nested selection statement and a while loop that takes user input a word (string) and generates a password based on the following conversion:
If the character being analyzed is a digit, concatenate the digit character to the new string.
If the character is a lowercase letter, concatenate the corresponding character to the new string as listed in the table below.
If the character being analyzed is anything other than a lower-case letter or digit, replace it by an (*) for that character.Also,my program should ask the user for a new word until the user enters ‘NO’, ’no’, or ‘No’ to stop.
Conversion table for each letter
a, b, c , d=#
e, f , g, h=@
i, j, k, l=?
m, n, o, p=%
q, r, s , t=&
u, v, w, x=$
y,z=!
What I have tried:
I tried switch case but i do not know how to replace specific letters in a string.