Question: Using Java, modify the Programming Project 4.8 on page 314 on writing a Caesar cipher by doing the following: 1. prompt the user for an
Using Java, modify the Programming Project 4.8 on page 314 on writing a Caesar cipher by doing the following:
1. prompt the user for an integer key to use as an offset (only allow 1- 25). This time the value the user enters will be used to seed the Random generator.
2. use a Random object to generate a random Int key
3. display a message with key to be used
4. create a loop to prompt user for a line of input and display it in ciphered form. "Enter line to cipher. ("blank" or "null" to exit; '#' to change key)"
Here is what I have so far:

D Caesar,java .project 1 import java.util.Scanner; 3 public class Caesar 5e public static void main(String[] args) 2 4. 6 7 8 9 10 String message- String count""; int key char rep; Scanner sc new Scanner (System.in); System.out.print( "Your message? "); 12 13 14 15 16 17 18 19 20 21 messagesc.nextLine(); System.out.print("Encoding key? "); key -sc.nextInt); for(int i = e; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
