title: Switch statement not adding to variable. What is wrong?
body: <p>What am I doing wrong? No matter what word is typed (In capital letters ofcourse), the program prints 0 points.</p>
  
  <p>I think it has something to do with where the variable is declared, but I am not sure how to fix it.</p>
  
  <pre><code>    public void run() {
      String word = readLine("Enter your word here: ");
      char ch;
      int points = 0;
      for (int i = 0;i&lt;word.length();i++) {
          ch = word.charAt(i);
          switch(ch) {
          case 1: ch = 'A';
          points += 1;
          break;
          case 2: ch = 'B';
          points +=3;
          break;
          case 3: ch = 'C';
          points +=3;
          break;
          case 4: ch = 'D';
          points +=2;
          break;
          case 5: ch = 'E';
          points +=1;
          break;
          case 6: ch = 'F';
          points +=4;
          break;
          case 7: ch = 'G';
          points +=2;
          break;
          case 8: ch = 'H';
          points +=4;
          break;
          case 9: ch = 'I';
          points +=1;
          break;
          case 10: ch = 'J';
          points +=8;
          break;
          case 11: ch = 'K';
          points +=5;
          break;
          case 12: ch = 'L';
          points +=1;
          break;
          case 13: ch = 'M';
          points +=3;
          break;
          case 14: ch = 'N';
          points +=1;
          break;
          case 15: ch = 'O';
          points +=1;
          break;
          case 16: ch = 'P';
          points +=3;
          break;
          case 17: ch = 'Q';
          points +=10;
          break;
          case 18: ch = 'R';
          points +=1;
          break;
          case 19: ch = 'S';
          points +=1;
          break;
          case 20: ch = 'T';
          points +=1;
          break;
          case 21: ch = 'U';
          points +=1;
          break;
          case 22: ch = 'V';
          points +=4;
          break;
          case 23: ch = 'W';
          points +=4;
          break;
          case 24: ch = 'X';
          points +=8;
          break;
          case 25: ch = 'Y';
          points +=4;
          break;
          case 26: ch = 'Z';
          points +=10;
          break;
          }
      }
      println("Your word gave "+points+" points");
  }
  
  }
  </code></pre>