Grading Students

  • + 0 comments

    For Java8:

    List gradeNew = new ArrayList<>();

    for(Integer grade: grades){

                if(grade>=38){
    
            if(grade%5>=3){
    
               grade =(grade/5+1)*5;
           }
        }
        gradeNew.add(grade);
    }
    return gradeNew;