Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Develop a program for effectively managing diversity. page 303

Answered: 1 week ago

Question

List the common methods used in selecting human resources. page 239

Answered: 1 week ago