package bestgpacalculator;

import java.util.ArrayList;

/**
 *
 * @author Steven
 */
public class Calculator {
    //Algorithm for calculating the GPA
    private ArrayList<Grade> gradeList = new ArrayList<Grade>();
    
    public Calculator(){
        
    }
    
    public void addGrade(Grade grade){
        gradeList.add(grade);
    }
    
    public void getGpa(){
        int count = gradeList.size();
        double total = 0;
        
        for(Grade grade : gradeList){
            total += grade.getValue();
//            System.out.println("Grade Value: " + grade.getValue());
        }
        
//        System.out.println("Total score: " + total);
        
        double gpa = total / count;
        
        String gpaLetter = Grade.decrypt.decryptNumberGrade(gpa);
        
        System.out.println("Your GPA: " + gpa);
        System.out.println("Your GPA Letter Grade: " + gpaLetter);
    }
}

@@ -840,34 +840,33 @@
 System.out.print
-ln
+f
 (%22Your GPA: %22 + 
@@ -859,21 +859,29 @@
 Your GPA
-:
  
+~ %25.2f %5Cn
 %22 
-+
+,
  gpa);%0D%0A

Formatted the output for the gpa.