public void outputBarChart() {
        
        System.out.println("Grade distribution: ");
        
        int[] frequency = new int[11];
        
        for(int grade : grades) {
            
            ++frequency[grade/10];
        }
        
        for(int count = 0; count < frequency.length; count++) {
            
            if(count == 10)
                System.out.printf("%5d: ", 100);
            else
                System.out.printf("%02d-%02d: ", count * 10, count * 10 + 9);
        
            
            for(int stars = 0; stars < frequency[count]; stars++)
                System.out.print("*");
            
            System.out.println();
        }
        
    }