private String key;
public SecretCode(String theKey)
public String encrypt(String clearText)
public String decrypt(String cipherText)
this is a small help to help you start.
now from what i understood from this you want to do:
first of all Encrypt
you have a string-->clearText
you have a key-->key
you have the ORDERED Key.
you must process each letter of clearText (for loop)
find its order inside ORDERED string (for loop) and get the char at the same position from
the key and replace the unEncrypted char with the encrypted one,
finally return encrypted string.
now with this in mind send your new code in order to help you.