Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started