Question: When running my program and choose the Vigenere Cipher code. I enter the keyword and then enter the filepath. However, I am receiving an error

When running my program and choose the Vigenere Cipher code. I enter the keyword and then enter the filepath. However, I am receiving an error pasted below. I have also attached my Vigenere code as well. I am lost to where this error might be. Any assistance on where I might need to correct my error?


Cipher x Select a cipher {1: Casesr, 2: Substitution, 3: Vigenere} : & Run: 3 Enter the keyword for the Vigenere Cipher: keyword Enter 

Cipher x Select a cipher {1: Casesr, 2: Substitution, 3: Vigenere} : & Run: 3 Enter the keyword for the Vigenere Cipher: keyword Enter the file path or 'quit' to exit the program: C:\Penn State\SWENG311\M11Assignment Out Resources fox.txt Exception in thread "main" java.lang.StringIndexOutOfBoundsException Create breakpoint: String index out of range: 0. at java.lang.String.charAt(String.java:658) at Vigenere.translate (Vigenere.java:25) at Translator. translated Text (Translator.java:29) at Cipher.main(Cipher.java:64) Process finished with exit code 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!