A validation method that takes in the message (as a string) and the offset integer entered by the user. The method should return “true” if the offset is between 0 and 26 inclusively and the message contains only letters and spaces. If it fails either criteria, it should return “false”. • If the validation method returns true, a second encryption method should be called. This method also takes in the message (as a string) and the offset integer entered by the user. It should convert the message to UPPERCASE, encrypt every letter in the message, and leave the spaces as they were. It should then return the encrypted message.
hello im stuck on a problem and it would be great if you could create a program that prompts the user for a message to encode,
as well as an offset to encrypt it with. You will then create and use the following methods:
• A validation method that takes in the message (as a string) and the offset integer
entered by the user. The method should return “true” if the offset is between 0
and 26 inclusively and the message contains only letters and spaces. If it fails
either criteria, it should return “false”.
• If the validation method returns true, a second encryption method should be
called. This method also takes in the message (as a string) and the offset integer
entered by the user. It should convert the message to UPPERCASE, encrypt
every letter in the message, and leave the spaces as they were. It should then
return the encrypted message.
i attached an image of the sample output


Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images









