title: public static double this method must return a double vaule
body: <p>I'm hoping someone could look at my code here and tell me why on line 88 (the  public static double dblLetterToGrade(String strLetter)) it gives me an error (as told in the title). I'm new to Java so I may have made a dumb mistake and not realize it and possibly give me a fix: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    import javax.swing.JOptionPane;
      import java.io.FileWriter;
      import java.io.*;
      import java.io.PrintWriter;
  
  public class GPAProject 
  
  {
   
  static String strReport, strName, strCreditsString, strClass, strGradeString, strLetter;
  static double dblLetterToGrade, dblTotalWeightedGrades = 0, dblGradeVaule=-1; 
  static int intTotalCredits = 0, intCreditsValue = -1; 
  static boolean boolfin = false;
  
   public static void main(String[] args) throws IOException
   
   {
          // Ask for name and write the output header which strReport gathers the data for the output file.
    strReport = "Classes for " + strName + ":\n";
    strReport += "Title\t\t\t\tCredits\t\t\t\tGrade\n";
  
          // Compute GPA (if there are classes).
          strReport += "\nGPA: ";
          if (intTotalCredits &gt; 0) 
          
          {
           strReport += String.format("%.2f", dblTotalWeightedGrades / intTotalCredits);
          } 
          
          else 
          
          {
           strReport += "None (no classes).";
          }
          // Write the report to classes.txt file.
          PrintWriter output = new PrintWriter(new FileWriter("classes.txt"));
          output.println(strReport);
          output.close();
          JOptionPane.showMessageDialog(null, "The report was written to the file.");
      {
   // Asks the user for the name until a valid name is entered.
    while (strName == null) 
           
          {
              strName = JOptionPane.showInputDialog("Enter your name:");
  
          }
    // Allows the user to enter class data until there are no more.
          while (!boolfin) 
          
          {
              String strClass = JOptionPane.showInputDialog("Enter class name (Cancel to finish):");
              if (strClass == null) 
              
              {
                  boolfin = true;
              } 
              
              else 
              
              {
                  // Ask for grade.
                  while (dblGradeVaule == -1) 
                  
                  {
                   strGradeString = JOptionPane.showInputDialog("Enter grade (uppercase):");
                      if (strGradeString == null) 
                      
                      {
                          JOptionPane.showMessageDialog(null, "Please enter a grade.");
                      } 
                      
                      else {
                       dblGradeVaule = dblLetterToGrade(strLetter);
                          if (dblGradeVaule == -1) {
                              JOptionPane.showMessageDialog(null, "The grade is invalid. Please enter it again.");
                      
  
                          
                      }
                  }
              }
              }
          }
      }
      }
       // Converts letter grade to numeric value
              public static double dblLetterToGrade(String strLetter) 
              {
               
        double dblGrade=0;
  
                      switch (strLetter) 
                      
                      {
                          case "A":  dblGrade = 4.00; break;
                          case "A-": dblGrade = 3.7; break;
                          case "B+": dblGrade = 3.2; break;
                          case "B":  dblGrade = 3.0; break;
                          case "B-": dblGrade = 2.7; break;
                          case "C+": dblGrade = 2.2; break;
                          case "C":  dblGrade = 2.0; break;
                          case "D+": dblGrade = 1.2; break;
                          case "D":  dblGrade = 1.00; break;
                          case "D-": dblGrade = 0.7; break;
                          case "F":  dblGrade = 0; break;
                      }
  
  {
  
   // Ask for credit hours.
                  while (intCreditsValue == -1) 
                  
                  {
                   strCreditsString = JOptionPane.showInputDialog("Enter credit hours:");
                   intCreditsValue = Integer.parseInt(strCreditsString);
                    if (intCreditsValue &lt;= 0) ;
                     
                     {
                          JOptionPane.showMessageDialog(null, "Please enter a positive number.");                    
                     }
                  }
  }
  {
   // Add to running totals and write to output string in file.
  intTotalCredits += intCreditsValue;
  dblTotalWeightedGrades += (intCreditsValue *  dblGradeVaule);
  strReport += strClass + "\t\t\t\t" + intCreditsValue + "\t\t\t\t" + strGradeString + "\n";
  
  }
  
   }
              
  }</code></pre>
  </div>
  </div>
  </p>