src/edu/kit/informatik/campusmanagement/Grade.java
/**
     * Returns the average grade for the provided arguments.
     * 
     * <p>If the weighting function returns non-positive values, the result of this method is undefined.
     * 
     * @param  <T> type parameter of the values
     * @param  values a collection of values
     * @param  function a function to convert a value to a grade
     * @param  weighting a function to convert a value to a weighting
     * @return the average grade
     */
Returns the average grade for the provided arguments.

If the weighting function returns non-positive values, the result of this method is undefined.


Returns the average grade for the provided arguments . If the weighting function returns non - positive values the result of this method is undefined .
public static <T> Grade average(
            final Collection<T> values,
            final Function<T, Grade> function,
            final ToIntFunction<T> weighting) {
        return average(values.stream(), function, weighting);
    }
public static < T > Grade average ( final Collection < T > values , final Function < T , Grade > function , final ToIntFunction < T > weighting ) { return average ( values . stream ( ) , function , weighting ) ; }
Returns the average grade for the provided arguments.
Returns the average grade for the provided arguments .
////