To encrypt, you have to encrypt each letter separately from the ORDERED string. For example, “J” is the 9th character in the ORDERED string (remember we start at zero), and the 9th character in James’ key is Q.

To decrypt a message: reverse the process. Find each character in the key, and select the
corresponding character from the ORDERED string.

The CodeTester class should handle all user interaction, using JOptionPane for both input and
output (no System.out.print or println, or Scanner).

I want to be able to ask whether to encrypt or decrypt.... if its encrypt, then i want to show the message to each of the spies (James, Austin, and Natasha). If decrypt, then just reverse the process and ask who it was from.

The keys appear in the CodeTester class, and should be given to the constructor of the SecretCode
class. The SecretCode class can then encrypt or decrypt messages based on this key.

The SecretCode class should do no input or output, except for debugging.

If you can help at all i would really appreciate it...im struggling a lot on this. Thanks!

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.