public class Example2
{
    public enum LetterGrade
    {
       F, D, DPLUS, CMINUS, C, CPLUS, BMINUS, B, BPLUS, AMINUS, A;       
    }
    
    public static void main(String[] args)
    {
    }

    public static String formatGrade(LetterGrade grade)
    {
       String          s;
       
       if      (grade.equals(LetterGrade.A))      s = "A";
       else if (grade.equals(LetterGrade.AMINUS)) s = "A-";
       else if (grade.equals(LetterGrade.BPLUS))  s = "B+";
       else if (grade.equals(LetterGrade.B))      s = "B";
       else if (grade.equals(LetterGrade.BMINUS)) s = "B-";
       else if (grade.equals(LetterGrade.CPLUS))  s = "C+";
       else if (grade.equals(LetterGrade.C))      s = "C";
       else if (grade.equals(LetterGrade.CMINUS)) s = "C-";
       else if (grade.equals(LetterGrade.DPLUS))  s = "D+";
       else if (grade.equals(LetterGrade.D))      s = "D";
       else                                       s = "F";

       return s;    
    }

    public static double pointsGrade(LetterGrade grade)
    {
       double          points;
       
       if      (grade.equals(LetterGrade.A))      points = 4.0;
       else if (grade.equals(LetterGrade.AMINUS)) points = 3.7;
       else if (grade.equals(LetterGrade.BPLUS))  points = 3.3;
       else if (grade.equals(LetterGrade.B))      points = 3.0;
       else if (grade.equals(LetterGrade.BMINUS)) points = 2.7;
       else if (grade.equals(LetterGrade.CPLUS))  points = 2.3;
       else if (grade.equals(LetterGrade.C))      points = 2.0;
       else if (grade.equals(LetterGrade.CMINUS)) points = 1.7;
       else if (grade.equals(LetterGrade.DPLUS))  points = 1.3;
       else if (grade.equals(LetterGrade.D))      points = 1.0;
       else                                       points = 0.0;

       return points;    
    }
}
