Question: Can you do this java question using my previous questions DOIN l to determine its position in the alphabet so that we can shift determir
DOIN l to determine its position in the alphabet so that we can shift determir the indexOf method: the character c, we need n forward. To do position - ALPHABET. indexofCe); we need to determine the amount e shift amount based on the corresponding digt in the pad Integer parseInt (pad. substringci,i1 hift to determine the new position. step would be larity of the shift. You can do this with an if statement It is simply positioneshift except we Thtp wou be to determiant int t nenPosition- position+ shift; if CnenPosition > ALPHABET.lengtho - newPosition ALPHABET.lengthO); newPosition n benefit from the fact that the % operator works circularly: mPosition-(position shift) % ALPHABET . length(); Here is the complete implementation pulic String encrypt (String note) String pad makePadCnote); String result-" fer Cint :i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
