I’m a new program and I have an assignment due in which I basically have to program using Java to retrieve an input from the console and encrypt it according to the periodic table’s atomic symbols. Here are the exact steps I am to follow:
- Go through the original string from left to right
- Look at the first 2 characters
- Verify if those 2 characters match 1 of the elements in the periodic table a. If it does, use the atomic number as a replacement for those 2 characters b. If it doesn’t, go back and look at just 1 character i. Verify if that character matches 1 of the elements in the periodic table a. If it does, use the atomic number as a replacement for that character b. If it doesn’t, leave that character unchanged
- Repeat the process until you reach the end of the original string
- Display the encrypted String
Can someone please guide me or tell me how to do this because I’m very confused. Thank you!!!!
Deema
Aucun commentaire:
Enregistrer un commentaire