Q:

Java Program not working in order that I had hoped?

I am making a program for a grade calculator, as well as a GPA calculator. In my GPA calculator I have code to take the grade they entered for their course and it will display a letter grade based on what they entered when they hit calculate. I later then use that letter grade displayed for some math in the calculation. When I run the program, it keeps returning me 0, though the code to get the letter grade is pretty far up in my code and the other math is a method near the end.
if(Double.parseDouble(txt11.getText()) < 50){
                txt12.setText("F");
} else if(Double.parseDouble(txt11.getText()) >= 50 && Double.parseDouble(txt11.getText()) <= 59){
                    txt12.setText("D");
} else if(Double.parseDouble(txt11.getText()) >= 60 && Double.parseDouble(txt11.getText()) <= 64){
                    txt12.setText("C");
} else if(Double.parseDouble(txt11.getText()) >= 65 && Double.parseDouble(txt11.getText()) <= 69){
                    txt12.setText("C+");
} else if(Double.parseDouble(txt11.getText()) >= 70 && Double.parseDouble(txt11.getText()) <= 74){
                    txt12.setText("B");
} else if(Double.parseDouble(txt11.getText()) >= 75 && Double.parseDouble(txt11.getText()) <= 79){
    txt12.setText("B+");
} else if(Double.parseDouble(txt11.getText()) >= 80 &&           Double.parseDouble(txt11.getText()) <= 84){
                    txt12.setText("A");
} else if(Double.parseDouble(txt11.getText()) >= 85){
                    txt12.setText("A+");
}

and this is my method that keeps returning 0.
public double getGP(JTextField a){
    double b = 0.0;
    if(a.getText().equals("A")){
       b = 4.0;
    } else if(a.getText().equals("B+")){
       b = 3.5;
    } else if(a.getText().equals("B")){
       b = 3.0;
    } else if(a.getText().equals("C+")){
       b = 2.5;
    } else if(a.getText().equals("C")){
       b = 2.0;
    } else if(a.getText().equals("D")){
       b = 1.0;
    } else if(a.getText().equals("F")){
       b = 0.0;
    }
        return b;
}

A:

First, let's fix getGP(). Get the text once, then trim it and call toUpperCase() on it. Finally, you can eliminate the local double with something like,
public double getGP(JTextField a) {
    // Don't forget, this needs to be txt12 (not txt11).
    String str = a.getText();
    str = (str != null) ? str.trim().toUpperCase() : "";
    if (str.equals("A")) {
        return 4.0;
    } else if (str.equals("B+")) {
        return 3.5;
    } else if (str.equals("B")) {
        return 3.0;
    } else if (str.equals("C+")) {
        return 2.5;
    } else if (str.equals("C")) {
        return 2.0;
    } else if (str.equals("D")) {
        return 1.0;
    }
    return 0.0;
}

Then we can update your letter grade code, it can be simplified immensely by parsing the number once and an else will only evaluate if the preceding if was false (so you could use) -
Double val = Double.parseDouble(txt11.getText());
if (val < 50) {
    txt12.setText("F");
} else if (val <= 59) {
    txt12.setText("D");
} else if (val <= 64) {
    txt12.setText("C");
} else if (val <= 69) {
    txt12.setText("C+");
} else if (val <= 74) {
    txt12.setText("B");
} else if (val <= 79) {
    txt12.setText("B+");
} else if (val <= 84) {
    txt12.setText("A");
} else {
    txt12.setText("A+");
}

