Update of exercises

main
Thomas Smits 2026-06-30 16:45:38 +02:00
parent 8ac6e0a1e9
commit 1a3bdad095
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ public class MapReduceGames {
// Abweichung als arithmetisches Mittel // Abweichung als arithmetisches Mittel
stream = games.stream(); stream = games.stream();
double mittelwert = stream.map( double mittelwert = stream.map(
g -> g.getMetaScore() - g.getUserScore()) g -> Math.abs(g.getMetaScore() - g.getUserScore()))
.reduce(0, (sum, value) -> sum + value); .reduce(0, (sum, value) -> sum + value);
mittelwert /= games.size(); mittelwert /= games.size();