Code Room
Code reviewMedium
Question
Review this Java code computing a per-seller average rating to display on a dashboard.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
double avgRating(List<Integer> ratings) { int sum = 0; for (Integer r : ratings) { sum += r; // ratings may contain null for 'no score' } return (double) sum / ratings.size();}Run or narrate your approach, then ask the coach.