This is what I have so far below. The //comments are what I am supposed to do but do not know how. I think I need a driver.java too. PLEASE help. I can attach the .java files if need be.
import java.io.*; import java.util.Scanner; import java.io.*; public class assign3{ public static void main(String[] args) throws IOException{ Scanner key = new Scanner(System.in); String choice = key.nextLine(); //Create string variables, choice, input, and output System.out.println("Do you want to encrypt or decrypt?"); //get the encrypt/decrypt choice System.out.println("Enter input file"); Scanner keyb = new Scanner(System.in); String path = keyb.nextLine(); //get the input file path //get the ouput file path //create an int variable //get the key value //make a new scanner to read from a file //make a new printwriter to write to the output file //create cipher object c with int variable as argument if(choice.equals("encrypt")){ while(/*scanner associated with file has next line*/){ //read a line from the file store it in a string called, say, indata //create a string variable called, say, outdata outdata = c.encryptLine(indata); //write outdata to file } } else{ //do the same for decrypting } //close PrintWriter } }