title: Creating a simple encryption program
body: <p>I'd like to use java to make a cipher of sorts, but im not sure how to go about it.</p>
  
  <p>Basically, I'd want the machine to accept a string of text, say "Abcd"</p>
  
  <p>and then a key, say '4532'     </p>
  
  <p>The program should move the characters forward in the alphabet if the number matching the place of the letter is even, and backward if it's odd.</p>
  
  <p>If there is no number, the key should loop around until it's out of characters in the string to change.</p>
  
  <p>the program would then print the key.    Ideally, if im pseudocoding this correctly, deciphering the string would be a reverse process only applicable with the key. </p>
  
  <p>I'm guessing i'd use a combination of an array and if/else statements.</p>
  
  <p>I'm not sure where to start.</p>
  
  <p>Example &amp; edit  String: 'hello' Key: '12'</p>
  
  <p>a b c d e f g h i j k l m n o p q r s t u v w x y z</p>
  
  <p>Because the corresponding key value is 1, h will travel backwards that many spaces.</p>
  
  <p>h = g</p>
  
  <p>because e has a 2, it'll move forward that many spaces.</p>
  
  <p>e = g</p>
  
  <p>the first l then becomes k, while the second becomes n.  The Key is repeated because the string is out of numbers to compare.   o turns into n because it's matched with 1.</p>
  
  <p>hello would become ggknn with the key 42.</p>